Bug 207122 - NetworkProcess should be notified by UIProcess when its service worker process connection should be on
Summary: NetworkProcess should be notified by UIProcess when its service worker proces...
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-03 08:58 PST by youenn fablet
Modified: 2020-02-04 09:24 PST (History)
5 users (show)

See Also:


Attachments
Patch (24.13 KB, patch)
2020-02-03 09:10 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (26.21 KB, patch)
2020-02-04 03:51 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (27.22 KB, patch)
2020-02-04 04:53 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-03 08:58:44 PST
NetworkProcess should be notified by UIProcess when its service worker process connection should be on
Comment 1 youenn fablet 2020-02-03 09:09:19 PST
<rdar://problem/59089780>
Comment 2 youenn fablet 2020-02-03 09:10:14 PST
Created attachment 389523 [details]
Patch
Comment 3 youenn fablet 2020-02-04 03:51:04 PST
Created attachment 389649 [details]
Patch
Comment 4 youenn fablet 2020-02-04 04:53:13 PST
Created attachment 389650 [details]
Patch
Comment 5 youenn fablet 2020-02-04 07:20:53 PST
<rdar://problem/58850406>
Comment 6 WebKit Commit Bot 2020-02-04 09:02:11 PST
Comment on attachment 389650 [details]
Patch

Clearing flags on attachment: 389650

Committed r255681: <https://trac.webkit.org/changeset/255681>
Comment 7 WebKit Commit Bot 2020-02-04 09:02:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Chris Dumez 2020-02-04 09:24:15 PST
Comment on attachment 389650 [details]
Patch

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

> Source/WebKit/UIProcess/WebProcessProxy.cpp:1610
> +    sendWithAsyncReply(Messages::WebProcess::EstablishWorkerContextConnectionToNetworkProcess { processPool().defaultPageGroup().pageGroupID(), m_serviceWorkerInformation->serviceWorkerPageProxyID, m_serviceWorkerInformation->serviceWorkerPageID, store, *m_registrableDomain, m_serviceWorkerInformation->initializationData }, [activity = m_throttler.backgroundActivity("Establish Service Worker"_s), completionHandler = WTFMove(completionHandler)]() mutable {

BTW, I think it is a great fix to take a background activity here. I had identified this as an issue locally and was about to upload a patch to fix this. Previously, the service worker process could suspend *before* having finished initialization and setup a connection to the network process. I am hoping this will address the flakiness issues on the bots.