Fix null realm assertion when activating a service worker (#36256)

Ensure there is an active realm when dispatching the `activation` DOM
event to the ServiceWorker global.

Testing: Existing WPT coverage.
Fixes: #36114
Fixes: #36235
Fixes: #36231

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-04-01 04:13:02 -04:00 committed by GitHub
parent be38c5478f
commit fcef1dff9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 579 additions and 116 deletions

View file

@ -1,37 +1,37 @@
[serviceworker-intercepted.https.html]
expected: CRASH
expected: TIMEOUT
[Already aborted request does not land in service worker]
expected: FAIL
expected: TIMEOUT
[response.arrayBuffer() rejects if already aborted]
expected: FAIL
expected: NOTRUN
[response.blob() rejects if already aborted]
expected: FAIL
expected: NOTRUN
[response.formData() rejects if already aborted]
expected: FAIL
expected: NOTRUN
[response.json() rejects if already aborted]
expected: FAIL
expected: NOTRUN
[response.text() rejects if already aborted]
expected: FAIL
expected: NOTRUN
[Stream errors once aborted.]
expected: FAIL
expected: NOTRUN
[fetch() rejects with abort reason]
expected: FAIL
expected: NOTRUN
[fetch() response body has abort reason]
expected: FAIL
expected: NOTRUN
[Service Worker can observe the fetch abort and associated abort reason]
expected: FAIL
expected: NOTRUN
[Abort reason serialization happens on abort]
expected: FAIL
expected: NOTRUN
[response.bytes() rejects if already aborted]
expected: FAIL
expected: NOTRUN