Bug 239962 - ServiceWorkerRegistration update should fail if called from an installing service worker context
Summary: ServiceWorkerRegistration update should fail if called from an installing ser...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-02 07:50 PDT by youenn fablet
Modified: 2022-05-03 02:04 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.96 KB, patch)
2022-05-02 07:52 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (4.96 KB, patch)
2022-05-02 22:29 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (5.01 KB, patch)
2022-05-02 23:46 PDT, youenn fablet
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2022-05-02 07:50:45 PDT
ServiceWorkerRegistration update should fail if called from an installing service worker context
Comment 1 youenn fablet 2022-05-02 07:52:01 PDT
Created attachment 458679 [details]
Patch
Comment 2 youenn fablet 2022-05-02 10:09:20 PDT
Comment on attachment 458679 [details]
Patch

win failures unrelated
Comment 3 Chris Dumez 2022-05-02 11:46:09 PDT
Comment on attachment 458679 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458679&action=review

> Source/WebCore/workers/service/ServiceWorkerRegistration.cpp:158
> +    if (auto* serviceWorkerGbalScope = dynamicDowncast<ServiceWorkerGlobalScope>(scriptExecutionContext()); serviceWorkerGbalScope && serviceWorkerGbalScope->serviceWorker().state() == ServiceWorkerState::Installing) {

typo: serviceWorkerGbalScope
Comment 4 youenn fablet 2022-05-02 22:29:31 PDT
Created attachment 458720 [details]
Patch for landing
Comment 5 EWS 2022-05-02 23:29:41 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 6 youenn fablet 2022-05-02 23:46:27 PDT
Created attachment 458723 [details]
Patch for landing
Comment 7 EWS 2022-05-03 01:08:03 PDT
Committed r293719 (250208@main): <https://commits.webkit.org/250208@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458723 [details].
Comment 8 Radar WebKit Bug Importer 2022-05-03 01:09:13 PDT
<rdar://problem/92655450>