summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2022-12-20 11:37:50 +0900
committerGitHub <noreply@github.com>2022-12-20 03:37:50 +0100
commit948f85216a15e4ef489af21bb532a9b201b0364c (patch)
tree35c2bbfa021cf9a4190ab803ed091c5547bfe9f4 /runtime/js/99_main.js
parent2ac575abfb75dc4533306c80240cb1beeb816b9b (diff)
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 1eb71339f..901cb136f 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -19,6 +19,7 @@ delete Intl.v8BreakIterator;
ArrayPrototypeMap,
DateNow,
Error,
+ ErrorPrototype,
FunctionPrototypeCall,
FunctionPrototypeBind,
ObjectAssign,
@@ -32,6 +33,7 @@ delete Intl.v8BreakIterator;
SymbolFor,
SymbolIterator,
PromisePrototypeThen,
+ SafeArrayIterator,
SafeWeakMap,
TypeError,
WeakMapPrototypeDelete,
@@ -204,7 +206,7 @@ delete Intl.v8BreakIterator;
);
loadedMainWorkerScript = true;
- for (const { url, script } of scripts) {
+ for (const { url, script } of new SafeArrayIterator(scripts)) {
const err = core.evalContext(script, url)[1];
if (err !== null) {
throw err.thrown;
@@ -217,7 +219,7 @@ delete Intl.v8BreakIterator;
}
function formatException(error) {
- if (error instanceof Error) {
+ if (ObjectPrototypeIsPrototypeOf(ErrorPrototype, error)) {
return null;
} else if (typeof error == "string") {
return `Uncaught ${