bootstrap: include event_target into the built-in snapshot

Since the module has to be loaded during bootstrap anyway.

PR-URL: https://github.com/nodejs/node/pull/45849
Backport-PR-URL: https://github.com/nodejs/node/pull/46425
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Joyee Cheung authored and Michaël Zasso committed 2023-11-10 09:46:28 +01:00
1 parent c3f56a3dee
commit 5f37decd56
2 files changed
+8 -3

No files matched your search

+5 -3
View File
@@ -42,9 +42,11 @@ defineOperation(globalThis, 'setTimeout', timers.setTimeout);
exposeLazyInterfaces(globalThis, 'internal/abort_controller', [
'AbortController', 'AbortSignal',
]);
exposeLazyInterfaces(globalThis, 'internal/event_target', [
'EventTarget', 'Event',
]);
const {
EventTarget, Event,
} = require('internal/event_target');
exposeInterface(globalThis, 'Event', Event);
exposeInterface(globalThis, 'EventTarget', EventTarget);
exposeLazyInterfaces(globalThis, 'internal/worker/io', [
'MessageChannel', 'MessagePort', 'MessageEvent',
]);
+3
View File
@@ -46,6 +46,7 @@ const expectedModules = new Set([
'NativeModule internal/constants',
'NativeModule internal/dns/utils',
'NativeModule internal/errors',
'NativeModule internal/event_target',
'NativeModule internal/fixed_queue',
'NativeModule internal/fs/utils',
'NativeModule internal/idna',
@@ -90,6 +91,7 @@ const expectedModules = new Set([
'NativeModule internal/vm',
'NativeModule internal/vm/module',
'NativeModule internal/wasm_web_api',
'NativeModule internal/webidl',
'NativeModule internal/worker/js_transferable',
'Internal Binding blob',
'NativeModule async_hooks',
@@ -99,6 +101,7 @@ const expectedModules = new Set([
'NativeModule url',
'NativeModule internal/v8/startup_snapshot',
'NativeModule vm',
'NativeModule util',
]);
if (!common.isMainThread) {