Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 7a4f947. rdar://problem/108884055
Webkit PWA in Bad State After Opening in-PWA Webkit Tab https://bugs.webkit.org/show_bug.cgi?id=256280 rdar://108884055 Reviewed by Chris Dumez. Network process is registerng a process with pages as service worker clients to a given service worker process. This allows UIProcess to suspend/resume the service worker process based on all its registered processes. Our logic to register page processes is working fine. Our logic to unregister page processes is not working fine if the same process has clients with different origins but the same registrable domain, for instance a process with a page 'a.example.org' and another page 'b.example.org'. In that case, when the 'b.example.org' page is gone, we would unregister the process while 'a.example.org' is still running. We update WebSWServerConnection::unregisterServiceWorkerClient to check for registrable domains of all pages. Manually tested, we cannot yet write tests with different registrable domains that make use of service workers. * Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::unregisterServiceWorkerClient): Canonical link: https://commits.webkit.org/263901@main Identifier: 259548.789@safari-7615-branch
- Loading branch information