Bug 239755

Summary: Ensure completion handler is called in SWServer::clear
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Service WorkersAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Sihui Liu 2022-04-25 21:39:38 PDT
...
Comment 1 Sihui Liu 2022-04-25 21:40:52 PDT
Created attachment 458325 [details]
Patch
Comment 2 youenn fablet 2022-04-26 07:42:05 PDT
Comment on attachment 458325 [details]
Patch

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

> Source/WebCore/workers/service/server/SWServer.cpp:348
> +    if (m_registrationStore) {

I would reverse the check, something like:
if (! m_registrationStore) { completionHandler(); return; }
Comment 3 Sihui Liu 2022-04-27 14:09:59 PDT
Comment on attachment 458325 [details]
Patch

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

>> Source/WebCore/workers/service/server/SWServer.cpp:348
>> +    if (m_registrationStore) {
> 
> I would reverse the check, something like:
> if (! m_registrationStore) { completionHandler(); return; }

Sure, will change.
Comment 4 Sihui Liu 2022-04-27 14:10:50 PDT
Created attachment 458466 [details]
Patch for landing
Comment 5 EWS 2022-04-27 19:05:07 PDT
Committed r293550 (250070@main): <https://commits.webkit.org/250070@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458466 [details].
Comment 6 Radar WebKit Bug Importer 2022-04-27 19:06:14 PDT
<rdar://problem/92433826>