From 750e3a8920a2638d47fcd1d8feab7afb6dd3fc96 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Sun, 7 Jun 2026 10:10:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=BA=A2=E5=87=BA?= =?UTF-8?q?=E5=88=86=E9=85=8D=E5=A4=B1=E6=95=88=E5=A0=86=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E6=BA=A2=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_types/src/object.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/oxide_types/src/object.rs b/crates/oxide_types/src/object.rs index 764da17e..1249aa39 100644 --- a/crates/oxide_types/src/object.rs +++ b/crates/oxide_types/src/object.rs @@ -241,11 +241,8 @@ impl JsObject { } pub fn set_prop_expand_heap(&mut self, offset: u8, val: JsValue) { - if offset >= 4 { - let needed = (offset as usize) + 1; - if self.overflow.is_null() || offset >= self.prop_count() + 4 { - self.alloc_overflow_heap(needed.max(8)); - } + if offset >= 4 && self.overflow.is_null() { + self.alloc_overflow_heap(32); } self.set_prop(offset, val); }