Bug 207661 - Do not call whenReady callbacks in case of network process crash
Summary: Do not call whenReady callbacks in case of network process crash
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: 2020-02-12 13:46 PST by youenn fablet
Modified: 2020-02-17 18:49 PST (History)
5 users (show)

See Also:


Attachments
Patch (3.49 KB, patch)
2020-02-12 13:54 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (3.24 KB, patch)
2020-02-12 16:49 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (3.17 KB, patch)
2020-02-17 14:38 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-02-12 13:46:39 PST
Make sure to not create a ServiceWorkerRegistration when calling whenReady callback in case of network process crash
Comment 1 youenn fablet 2020-02-12 13:54:15 PST
Created attachment 390555 [details]
Patch
Comment 2 youenn fablet 2020-02-12 16:49:27 PST
Created attachment 390590 [details]
Patch
Comment 3 youenn fablet 2020-02-13 12:15:32 PST
Ping review.
Comment 4 Chris Dumez 2020-02-17 12:28:43 PST
Comment on attachment 390590 [details]
Patch

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

> Source/WebCore/workers/service/WorkerSWClientConnection.cpp:-57
> -    auto whenRegistrationReadyRequests = WTFMove(m_whenRegistrationReadyRequests);

I believe this means the ready promise will never get resolved in this case. Which is unfortunate.
Comment 5 youenn fablet 2020-02-17 14:32:07 PST
(In reply to Chris Dumez from comment #4)
> Comment on attachment 390590 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=390590&action=review
> 
> > Source/WebCore/workers/service/WorkerSWClientConnection.cpp:-57
> > -    auto whenRegistrationReadyRequests = WTFMove(m_whenRegistrationReadyRequests);
> 
> I believe this means the ready promise will never get resolved in this case.
> Which is unfortunate.

That is why we are using a Function and not a CompletionHandler.
There is no guarantee that it will be ready anytime soon.
With or without this patch, if the network process is crashing, we are in a bad position with regards to the ready promise.

I will update the patch to clear the function handler.
Comment 6 youenn fablet 2020-02-17 14:38:37 PST
Created attachment 390981 [details]
Patch
Comment 7 WebKit Commit Bot 2020-02-17 17:59:44 PST
The commit-queue encountered the following flaky tests while processing attachment 390981 [details]:

The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2020-02-17 18:00:02 PST
The commit-queue encountered the following flaky tests while processing attachment 390981 [details]:

editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org)
The commit-queue is continuing to process your patch.
Comment 9 WebKit Commit Bot 2020-02-17 18:48:27 PST
Comment on attachment 390981 [details]
Patch

Clearing flags on attachment: 390981

Committed r256805: <https://trac.webkit.org/changeset/256805>
Comment 10 WebKit Commit Bot 2020-02-17 18:48:28 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2020-02-17 18:49:19 PST
<rdar://problem/59535599>