Bug 239962

Summary: ServiceWorkerRegistration update should fail if called from an installing service worker context
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing ews-feeder: commit-queue-

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>