diff --git a/ext/runtime/js/bootstrap.js b/ext/runtime/js/bootstrap.js index 765d296c..9035efc3 100644 --- a/ext/runtime/js/bootstrap.js +++ b/ext/runtime/js/bootstrap.js @@ -263,6 +263,7 @@ const globalScope = { performance: writable(performance.performance), // messagePort + MessagePort: nonEnumerable(messagePort.MessagePort), MessageChannel: nonEnumerable(messagePort.MessageChannel), structuredClone: writable(messagePort.structuredClone), @@ -768,7 +769,6 @@ globalThis.bootstrapSBEdge = (opts, ctx) => { }); } - const nodeBootstrap = globalThis.nodeBootstrap; if (nodeBootstrap) { nodeBootstrap({ runningOnMainThread: true, @@ -783,6 +783,8 @@ globalThis.bootstrapSBEdge = (opts, ctx) => { delete globalThis.bootstrapSBEdge; }; +const nodeBootstrap = globalThis.nodeBootstrap; + globalThis.bootstrap = { dispatchLoadEvent, dispatchUnloadEvent, @@ -794,3 +796,4 @@ globalThis.bootstrap = { core.setUnhandledPromiseRejectionHandler(processUnhandledPromiseRejection); core.setHandledPromiseRejectionHandler(processRejectionHandled); +nodeBootstrap({ warmup: true });