Skip to content

Commit 516e809

Browse files
authored
Remove abort reference from setTimeout polyfill. (#22985)
Adding a reference from `globalThis` -> `abort` ends up preventing GC of the whole `Module` since `abort` references `Module`. Fixes: #22979
1 parent 8dc5d05 commit 516e809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ if (ENVIRONMENT_IS_SHELL) {
319319
globalThis.clearTimeout ??= (id) => {};
320320

321321
// spidermonkey lacks setTimeout but we use it above in readAsync.
322-
globalThis.setTimeout ??= (f) => (typeof f == 'function') ? f() : abort();
322+
globalThis.setTimeout ??= (f) => f();
323323

324324
// v8 uses `arguments_` whereas spidermonkey uses `scriptArgs`
325325
arguments_ = globalThis.arguments || globalThis.scriptArgs;

0 commit comments

Comments
 (0)