[webkit-changes] [WebKit/WebKit] 7a4f94: Webkit PWA in Bad State After Opening in-PWA Webki...
youennf
noreply at github.com
Wed May 10 08:22:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7a4f94728cdec380733b5c8d9f68ea689f85459e
https://github.com/WebKit/WebKit/commit/7a4f94728cdec380733b5c8d9f68ea689f85459e
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
Log Message:
-----------
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
More information about the webkit-changes
mailing list