mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 10:41:11 +08:00
fix: 选择性重建收尾重指保留对象 proto 槽并恰好释放一次被替换旧 P 对象属性区——含保活钉住对属性区,本体钉保留作重指遗漏兜底
This commit is contained in:
@@ -740,6 +740,10 @@ impl KernelSession {
|
||||
// 旧 world 的登记表并入新 world:存活 wrapper(未污染家族别名)仍须在
|
||||
// session 收尾统一释放;已弃 wrapper 随之恰好释放一次,不二次持有。
|
||||
new_world.inherit_leaked_objects(&old_world);
|
||||
// 重建收尾:保留对象(登记表 wrapper + 共用保留 P 字段)proto 槽
|
||||
// 重指新指针,随后被替换旧对象属性区恰好释放一次(含保活钉住
|
||||
// 对的属性区,本体钉保留);重指须先于释放、先于换出完成。
|
||||
new_world.retire_replaced(&old_world);
|
||||
self.builtin_world = Arc::new(new_world);
|
||||
}
|
||||
dirty
|
||||
|
||||
Reference in New Issue
Block a user