diff options
author | Simon Rask <33556894+SimonRask@users.noreply.github.com> | 2021-07-04 17:26:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 17:26:38 +0200 |
commit | a8f9ac654dce7b7b62c44d8810a8b6bf9acc7c37 (patch) | |
tree | 57d71b106c195115819d3b211dbbbeec7acd5569 /runtime/js/99_main.js | |
parent | f0fbd49a2d1f506f2e59a089b32cbfe960a999fe (diff) |
fix: primordials in extensions/net and runtime/js (#11270)
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index a72b2177b..41cd0d05b 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -20,6 +20,7 @@ delete Object.prototype.__proto__; Symbol, SymbolFor, SymbolIterator, + PromisePrototypeThen, } = window.__bootstrap.primordials; const util = window.__bootstrap.util; const eventTarget = window.__bootstrap.eventTarget; @@ -67,11 +68,13 @@ delete Object.prototype.__proto__; windowIsClosing = true; // Push a macrotask to exit after a promise resolve. // This is not perfect, but should be fine for first pass. - PromiseResolve().then(() => - FunctionPrototypeCall(timers.setTimeout, null, () => { - // This should be fine, since only Window/MainWorker has .close() - os.exit(0); - }, 0) + PromisePrototypeThen( + PromiseResolve(), + () => + FunctionPrototypeCall(timers.setTimeout, null, () => { + // This should be fine, since only Window/MainWorker has .close() + os.exit(0); + }, 0), ); } } |