From 8f973498efe9908183924bcf5702206ed586d4ee Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Sat, 6 Jun 2026 21:26:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=88=86=E9=85=8D=E6=BA=A2=E5=87=BA=E5=AF=BC=E8=87=B4=E5=86=85?= =?UTF-8?q?=E5=AD=98=E8=AE=BF=E9=97=AE=E9=94=99=E8=AF=AF=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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/oxide_types/src/object.rs b/crates/oxide_types/src/object.rs index e03dc06c..3d3b7203 100644 --- a/crates/oxide_types/src/object.rs +++ b/crates/oxide_types/src/object.rs @@ -146,8 +146,9 @@ impl JsObject { } pub fn set_prop_expand(&mut self, offset: u8, val: JsValue, bump: &bumpalo::Bump) { - if offset >= 4 && (self.overflow.is_null() || offset >= self.prop_count()) { - self.alloc_overflow(bump, (offset as usize) + 1); + if offset >= 4 { + let needed = (offset as usize) + 1; + self.alloc_overflow(bump, needed.max(8)); } self.set_prop(offset, val); }