diff --git a/ext/web/03_abort_signal.js b/ext/web/03_abort_signal.js index 4c6230e52212ec..2cc64189be7640 100644 --- a/ext/web/03_abort_signal.js +++ b/ext/web/03_abort_signal.js @@ -86,15 +86,17 @@ class AbortSignal extends EventTarget { return; } this[abortReason] = reason; - if (this[abortAlgos] !== null) { - for (const algorithm of new SafeSetIterator(this[abortAlgos])) { - algorithm(); - } - this[abortAlgos] = null; - } + const algos = this[abortAlgos]; + this[abortAlgos] = null; + const event = new Event("abort"); setIsTrusted(event, true); this.dispatchEvent(event); + if (algos !== null) { + for (const algorithm of new SafeSetIterator(algos)) { + algorithm(); + } + } } [remove](algorithm) { diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json index c587062ca5e5c3..b75183d89d90cf 100644 --- a/tools/wpt/expectation.json +++ b/tools/wpt/expectation.json @@ -4944,12 +4944,8 @@ "abort": { "request.any.html": true, "request.any.worker.html": true, - "general.any.html": [ - "Clone aborts with original controller" - ], - "general.any.worker.html": [ - "Clone aborts with original controller" - ], + "general.any.html": true, + "general.any.worker.html": true, "cache.https.any.html": false, "cache.https.any.worker.html": false },