mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 11:11:11 +08:00
feat: VmHost 加 BroadcastChannel 注册表三方法并 full_reset 清表
This commit is contained in:
@@ -466,6 +466,9 @@ impl Vm {
|
||||
// 否则下次命中返回悬垂指针。
|
||||
self.number_to_string_cache_keys = [0u64; 16];
|
||||
self.number_to_string_cache_vals = [JsValue::undefined(); 16];
|
||||
// BroadcastChannel 注册表持 session 对象裸指针:teardown 释放全部
|
||||
// session 对象前须清表,否则残留悬垂指针。
|
||||
self.realm.gc.borrow_mut().broadcast_channels.clear();
|
||||
self.realm.teardown_session_heap_data();
|
||||
self.realm.gc.borrow_mut().session_bytes_allocated = 0;
|
||||
self.realm.gc.borrow_mut().session_bytes_peak = 0;
|
||||
|
||||
Reference in New Issue
Block a user