Make sure to not create a ServiceWorkerRegistration when calling whenReady callback in case of network process crash
Created attachment 390555 [details] Patch
Created attachment 390590 [details] Patch
Ping review.
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.
(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.
Created attachment 390981 [details] Patch
The commit-queue encountered the following flaky tests while processing attachment 390981 [details]: The commit-queue is continuing to process your patch.
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 on attachment 390981 [details] Patch Clearing flags on attachment: 390981 Committed r256805: <https://trac.webkit.org/changeset/256805>
All reviewed patches have been landed. Closing bug.
<rdar://problem/59535599>