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,2 +1,199 @@
[same-site-cookies.https.html]
expected: CRASH
expected: TIMEOUT
[Setup service workers]
expected: TIMEOUT
[same-origin, window.open with no service worker]
expected: NOTRUN
[same-origin, window.open with fallback]
expected: NOTRUN
[same-origin, window.open with passthrough]
expected: NOTRUN
[same-origin, window.open with change-request]
expected: NOTRUN
[same-origin, window.open with navpreload]
expected: NOTRUN
[same-site, window.open with no service worker]
expected: NOTRUN
[same-site, window.open with fallback]
expected: NOTRUN
[same-site, window.open with passthrough]
expected: NOTRUN
[same-site, window.open with change-request]
expected: NOTRUN
[same-site, window.open with navpreload]
expected: NOTRUN
[cross-site, window.open with no service worker]
expected: NOTRUN
[cross-site, window.open with fallback]
expected: NOTRUN
[cross-site, window.open with passthrough]
expected: NOTRUN
[cross-site, window.open with change-request]
expected: NOTRUN
[cross-site, window.open with navpreload]
expected: NOTRUN
[same-origin, window.open with no service worker and same-site redirect]
expected: NOTRUN
[same-origin, window.open with fallback and same-site redirect]
expected: NOTRUN
[same-origin, window.open with passthrough and same-site redirect]
expected: NOTRUN
[same-origin, window.open with change-request and same-site redirect]
expected: NOTRUN
[same-origin, window.open with navpreload and same-site redirect]
expected: NOTRUN
[same-origin, window.open with no service worker and cross-site redirect]
expected: NOTRUN
[same-origin, window.open with fallback and cross-site redirect]
expected: NOTRUN
[same-origin, window.open with passthrough and cross-site redirect]
expected: NOTRUN
[same-origin, window.open with change-request and cross-site redirect]
expected: NOTRUN
[same-origin, window.open with navpreload and cross-site redirect]
expected: NOTRUN
[same-origin, window.open with no service worker, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, window.open with fallback, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, window.open with passthrough, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, window.open with change-request, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, window.open with navpreload, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, nested window.open with cross-site middle frame and no service worker]
expected: NOTRUN
[same-origin, nested window.open with cross-site middle frame and fallback service worker]
expected: NOTRUN
[same-origin, nested window.open with cross-site middle frame and passthrough service worker]
expected: NOTRUN
[same-origin, nested window.open with cross-site middle frame and change-request service worker]
expected: NOTRUN
[same-origin, nested window.open with cross-site middle frame and navpreload service worker]
expected: NOTRUN
[same-origin, nested set location with cross-site middle frame and no service worker]
expected: NOTRUN
[same-origin, nested set location with cross-site middle frame and fallback service worker]
expected: NOTRUN
[same-origin, nested set location with cross-site middle frame and passthrough service worker]
expected: NOTRUN
[same-origin, nested set location with cross-site middle frame and change-request service worker]
expected: NOTRUN
[same-origin, nested set location with cross-site middle frame and navpreload service worker]
expected: NOTRUN
[same-origin, form post with no service worker]
expected: NOTRUN
[same-origin, form post with fallback]
expected: NOTRUN
[same-origin, form post with passthrough]
expected: NOTRUN
[same-origin, form post with change-request]
expected: NOTRUN
[same-site, form post with no service worker]
expected: NOTRUN
[same-site, form post with fallback]
expected: NOTRUN
[same-site, form post with passthrough]
expected: NOTRUN
[same-site, form post with change-request]
expected: NOTRUN
[cross-site, form post with no service worker]
expected: NOTRUN
[cross-site, form post with fallback]
expected: NOTRUN
[cross-site, form post with passthrough]
expected: NOTRUN
[cross-site, form post with change-request]
expected: NOTRUN
[same-origin, form post with no service worker and same-site redirect]
expected: NOTRUN
[same-origin, form post with fallback and same-site redirect]
expected: NOTRUN
[same-origin, form post with passthrough and same-site redirect]
expected: NOTRUN
[same-origin, form post with change-request and same-site redirect]
expected: NOTRUN
[same-origin, form post with no service worker and cross-site redirect]
expected: NOTRUN
[same-origin, form post with fallback and cross-site redirect]
expected: NOTRUN
[same-origin, form post with passthrough and cross-site redirect]
expected: NOTRUN
[same-origin, form post with change-request and cross-site redirect]
expected: NOTRUN
[same-origin, form post with no service worker, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, form post with fallback, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, form post with passthrough, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[same-origin, form post with change-request, cross-site redirect, and same-origin redirect]
expected: NOTRUN
[Cleanup service workers]
expected: NOTRUN