diff options
author | 2023-09-12 20:47:14 -0700 | |
---|---|---|
committer | 2023-09-12 20:47:14 -0700 | |
commit | ec251863d149db3b2bf07d106c5aa7a2074e5301 (patch) | |
tree | 92baf39c3424ef4f737ea4b5ef56098cc2bd579d /src/bun.js/javascript.zig | |
parent | 85bf54a3ac2b737497e32219f78412ff9a02dbdb (diff) | |
download | bun-ec251863d149db3b2bf07d106c5aa7a2074e5301.tar.gz bun-ec251863d149db3b2bf07d106c5aa7a2074e5301.tar.zst bun-ec251863d149db3b2bf07d106c5aa7a2074e5301.zip |
track registered one shot fds
Diffstat (limited to 'src/bun.js/javascript.zig')
-rw-r--r-- | src/bun.js/javascript.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index 752fcb3a4..2733d46b4 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -526,6 +526,8 @@ pub const VirtualMachine = struct { debugger: ?Debugger = null, has_started_debugger: bool = false, + registered_one_shot_epoll_fds: std.AutoHashMap(u64, void), + pub const OnUnhandledRejection = fn (*VirtualMachine, globalObject: *JSC.JSGlobalObject, JSC.JSValue) void; pub const OnException = fn (*ZigException) void; @@ -1068,6 +1070,7 @@ pub const VirtualMachine = struct { .file_blobs = JSC.WebCore.Blob.Store.Map.init(allocator), .standalone_module_graph = opts.graph.?, .parser_arena = @import("root").bun.ArenaAllocator.init(allocator), + .registered_one_shot_epoll_fds = std.AutoHashMap(u64, void).init(allocator), }; vm.source_mappings = .{ .map = &vm.saved_source_map_table }; vm.regular_event_loop.tasks = EventLoop.Queue.init( @@ -1170,6 +1173,7 @@ pub const VirtualMachine = struct { .ref_strings_mutex = Lock.init(), .file_blobs = JSC.WebCore.Blob.Store.Map.init(allocator), .parser_arena = @import("root").bun.ArenaAllocator.init(allocator), + .registered_one_shot_epoll_fds = std.AutoHashMap(u64, void).init(allocator), }; vm.source_mappings = .{ .map = &vm.saved_source_map_table }; vm.regular_event_loop.tasks = EventLoop.Queue.init( @@ -1301,6 +1305,7 @@ pub const VirtualMachine = struct { .parser_arena = @import("root").bun.ArenaAllocator.init(allocator), .standalone_module_graph = worker.parent.standalone_module_graph, .worker = worker, + .registered_one_shot_epoll_fds = std.AutoHashMap(u64, void).init(allocator), }; vm.source_mappings = .{ .map = &vm.saved_source_map_table }; vm.regular_event_loop.tasks = EventLoop.Queue.init( @@ -1922,6 +1927,7 @@ pub const VirtualMachine = struct { // TODO: pub fn deinit(this: *VirtualMachine) void { this.source_mappings.deinit(); + this.registered_one_shot_epoll_fds.deinit(); } pub const ExceptionList = std.ArrayList(Api.JsException); |