feat: BroadcastChannel 载荷盒与 GC 家族表接线

This commit is contained in:
2026-10-09 04:39:22 +00:00
parent dd373ef3f0
commit 2dc543b176
7 changed files with 181 additions and 26 deletions
+4 -1
View File
@@ -11,7 +11,8 @@ use crate::native_box_dispatch;
use crate::vm::RootGroup;
use crate::vm::Vm;
use oxide_builtins::{
array_buffer, data_view, disposable_stack, map, message_channel, module, regexp, set, typed_array, weak_map,
array_buffer, broadcast_channel, data_view, disposable_stack, map, message_channel, module, regexp, set,
typed_array, weak_map,
};
/// session 级 mark-sweep GC 的状态与统计。
@@ -130,6 +131,7 @@ impl SessionGc {
bytes += crate::async_generator::async_generator_native_size(obj);
bytes += weak_map::weak_map_native_size(obj);
bytes += message_channel::message_port_native_size(obj);
bytes += broadcast_channel::broadcast_channel_native_size(obj);
bytes
}
@@ -570,6 +572,7 @@ impl SessionGc {
freed_bytes += crate::async_generator::drop_async_generator_native(obj);
freed_bytes += weak_map::drop_weak_map_native(obj);
freed_bytes += message_channel::drop_message_port_native(obj);
freed_bytes += broadcast_channel::drop_broadcast_channel_native(obj);
freed_bytes
}