mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 11:11:11 +08:00
fix: pending_length_exception 登记 GC 根遍历与搬移重写
This commit is contained in:
@@ -40,6 +40,17 @@ fn uncaught_value_is_gc_root() {
|
||||
assert!(has_ptr(&roots, session));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pending_length_exception_is_gc_root() {
|
||||
let mut vm = Vm::new();
|
||||
let obj = plain_object(&mut vm);
|
||||
let session = vm.promote_object(obj);
|
||||
vm.pending_length_exception = Some(JsValue::from_js_object(session));
|
||||
let mut roots = Vec::new();
|
||||
vm.for_each_root(|v| roots.push(v));
|
||||
assert!(has_ptr(&roots, session));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn suspended_signal_fields_are_roots() {
|
||||
let mut vm = Vm::new();
|
||||
|
||||
Reference in New Issue
Block a user