feat: 落地 Proxy 构造器与 revocable 及撤销函数

This commit is contained in:
2026-10-17 05:47:54 +00:00
parent 985310d545
commit 60170ac9be
11 changed files with 483 additions and 106 deletions
@@ -98,8 +98,8 @@ fn stub_proto_member_read_returns_undefined() {
assert!(result.as_bool());
}
/// 构造体不回归钉:四 stub 构造调用仍抛 TypeError(消息含 "… is not
/// implemented");WeakMap 已落地真构造器,不在此列。
/// 构造体不回归钉:三弱族 stub 构造调用仍抛 TypeError(消息含 "… is not
/// implemented");WeakMap 与 Proxy 已落地真构造器,不在此列。
#[test]
fn stub_ctor_call_still_throws_not_implemented() {
let mut vm = Vm::new();
@@ -113,8 +113,7 @@ fn stub_ctor_call_still_throws_not_implemented() {
} \
return probe(WeakSet, [], 'WeakSet') \
&& probe(WeakRef, [{}], 'WeakRef') \
&& probe(FinalizationRegistry, [function () {}], 'FinalizationRegistry') \
&& probe(Proxy, [ {}, {} ], 'Proxy'); })()",
&& probe(FinalizationRegistry, [function () {}], 'FinalizationRegistry'); })()",
)
.unwrap();
assert!(result.as_bool());