From 417368dd5f6381d87bcfc7575aa5c19b909fe994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=88=B1=E7=89=B9=E6=AF=8F=E7=BE=8A=E9=98=9F?= Date: Fri, 26 Jun 2026 16:41:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E5=90=8C=E6=AD=A5=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E8=B0=83=E7=94=A8=E5=8F=82=E6=95=B0=E9=99=90=E5=88=B6?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF=E5=AF=B9=E9=BD=90=20ECMASc?= =?UTF-8?q?ript=20=E8=A7=84=E8=8C=83=E6=8E=AA=E8=BE=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_vm/src/vm.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/oxide_vm/src/vm.rs b/crates/oxide_vm/src/vm.rs index cc45439..d25655c 100644 --- a/crates/oxide_vm/src/vm.rs +++ b/crates/oxide_vm/src/vm.rs @@ -252,10 +252,7 @@ impl Vm { &mut self, receiver: JsValue, callee: JsValue, args: &[JsValue], ) -> Result, String> { if args.len() > Self::SYNC_NATIVE_ARG_LIMIT { - return Err(format!( - "RangeError: synchronous native call supports at most {} arguments", - Self::SYNC_NATIVE_ARG_LIMIT - )); + return Err("RangeError: Maximum call stack size exceeded".to_string()); } self.regs[253] = receiver; @@ -1450,7 +1447,7 @@ mod tests { .call_function_sync(callee, JsValue::undefined(), &args) .expect_err("too many args should fail cleanly"); - assert!(err.contains("at most 253 arguments"), "unexpected error: {err}"); + assert!(err.contains("Maximum call stack size exceeded"), "unexpected error: {err}"); assert_eq!(vm.reg(1), JsValue::int(7)); assert_eq!(vm.reg(253), JsValue::int(11)); assert_eq!(vm.reg(254), JsValue::int(12));