Bug 239755 - Ensure completion handler is called in SWServer::clear
Summary: Ensure completion handler is called in SWServer::clear
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: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-25 21:39 PDT by Sihui Liu
Modified: 2022-04-27 19:06 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.08 KB, patch)
2022-04-25 21:40 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (2.13 KB, patch)
2022-04-27 14:10 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>