diff options
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:") |