diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2022-12-20 11:37:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 03:37:50 +0100 |
commit | 948f85216a15e4ef489af21bb532a9b201b0364c (patch) | |
tree | 35c2bbfa021cf9a4190ab803ed091c5547bfe9f4 /ext/web/02_event.js | |
parent | 2ac575abfb75dc4533306c80240cb1beeb816b9b (diff) |
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
Diffstat (limited to 'ext/web/02_event.js')
-rw-r--r-- | ext/web/02_event.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/web/02_event.js b/ext/web/02_event.js index fa1c94332..060101498 100644 --- a/ext/web/02_event.js +++ b/ext/web/02_event.js @@ -428,7 +428,7 @@ Ctor, props, ) { - for (const prop of props) { + for (const prop of new SafeArrayIterator(props)) { ReflectDefineProperty(Ctor.prototype, prop, { enumerable: true }); } } @@ -969,7 +969,7 @@ listeners[type] = []; } - for (const listener of listeners[type]) { + for (const listener of new SafeArrayIterator(listeners[type])) { if ( ((typeof listener.options === "boolean" && listener.options === options.capture) || @@ -1334,9 +1334,12 @@ [SymbolFor("Deno.privateCustomInspect")](inspect) { return inspect(consoleInternal.createFilteredInspectProxy({ object: this, - evaluate: this instanceof PromiseRejectionEvent, + evaluate: ObjectPrototypeIsPrototypeOf( + PromiseRejectionEvent.prototype, + this, + ), keys: [ - ...EVENT_PROPS, + ...new SafeArrayIterator(EVENT_PROPS), "promise", "reason", ], @@ -1451,7 +1454,7 @@ colno = jsError.frames[0].columnNumber; } else { const jsError = core.destructureError(new Error()); - for (const frame of jsError.frames) { + for (const frame of new SafeArrayIterator(jsError.frames)) { if ( typeof frame.fileName == "string" && !StringPrototypeStartsWith(frame.fileName, "deno:") |