summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/net/01_net.js3
-rw-r--r--runtime/js/99_main.js13
2 files changed, 9 insertions, 7 deletions
diff --git a/extensions/net/01_net.js b/extensions/net/01_net.js
index 9703bd321..cc10a1c0a 100644
--- a/extensions/net/01_net.js
+++ b/extensions/net/01_net.js
@@ -6,7 +6,6 @@
const { BadResource } = core;
const {
PromiseResolve,
- Symbol,
SymbolAsyncIterator,
Uint8Array,
TypedArrayPrototypeSubarray,
@@ -187,7 +186,7 @@
core.close(this.rid);
}
- async *[Symbol.asyncIterator]() {
+ async *[SymbolAsyncIterator]() {
while (true) {
try {
yield await this.receive();
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),
);
}
}