mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 03:01:12 +08:00
fix: CREATE_CLOSURE 跨 run 帧按执行帧表代际解析——嵌套闭包错代盖写闭合,挂起恢复重设活跃代际,OOB 消息上界对齐实际查表代际
This commit is contained in:
@@ -105,11 +105,12 @@ impl Vm {
|
||||
let sub = match self.callee_module(ctor_obj) {
|
||||
Some(m) => m,
|
||||
None => {
|
||||
// 上界取构造器自身代际平表长度(跨 run 调用时可异于当前代际)。
|
||||
return Err(format!(
|
||||
"NEW_EXPRESSION: sub_module_index {} out of bounds (max {})",
|
||||
sub_idx,
|
||||
self.current_table().modules.len()
|
||||
))
|
||||
self.tables.get(&ctor_obj.table_gen()).map(|t| t.modules.len()).unwrap_or(0)
|
||||
));
|
||||
}
|
||||
};
|
||||
// 生成器函数不是构造器:`new g()` 抛 TypeError。
|
||||
|
||||
Reference in New Issue
Block a user