Run callback passed to napi_module_register after dlopen returns instead of during call (#20478)

This commit is contained in:
190n
2025-07-24 11:46:56 -07:00
committed by GitHub
parent 9fa8ae9a40
commit 03dfd7d96b
9 changed files with 132 additions and 28 deletions

View File

@@ -311,32 +311,17 @@ let knownGlobals = [
setInterval,
setTimeout,
queueMicrotask,
addEventListener,
alert,
confirm,
dispatchEvent,
postMessage,
prompt,
removeEventListener,
reportError,
Bun,
File,
process,
Blob,
Buffer,
BuildError,
BuildMessage,
HTMLRewriter,
Request,
ResolveError,
ResolveMessage,
Response,
TextDecoder,
AbortSignal,
BroadcastChannel,
CloseEvent,
DOMException,
ErrorEvent,
Event,
EventTarget,
FormData,
@@ -351,11 +336,31 @@ let knownGlobals = [
URL,
URLSearchParams,
WebSocket,
Worker,
onmessage,
onerror,
];
if (typeof Bun === "object") {
knownGlobals.push(
addEventListener,
alert,
confirm,
dispatchEvent,
postMessage,
prompt,
removeEventListener,
Bun,
reportError,
BuildError,
BuildMessage,
HTMLRewriter,
ResolveError,
ResolveMessage,
ErrorEvent,
Worker,
onmessage,
onerror,
);
}
const globalKeys = [
"gc",
"navigator",