Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5ea941c44c076d3def9773c5cd5691b8f4a41c1b
https://github.com/WebKit/WebKit/commit/5ea941c44c076d3def9773c5cd5691b8f4a41c1b
Author: Alex Christensen <[email protected]>
Date: 2022-12-22 (Thu, 22 Dec 2022)
Changed paths:
M Source/WebCore/workers/service/server/RegistrationDatabase.cpp
M Source/WebCore/workers/service/server/RegistrationDatabase.h
M Source/WebCore/workers/service/server/RegistrationStore.cpp
M Source/WebCore/workers/service/server/RegistrationStore.h
M Source/WebCore/workers/service/server/SWServer.cpp
M Source/WebCore/workers/service/server/SWServer.h
Log Message:
-----------
REGRESSION (258175@main?): [ iOS Debug ]
TestWebKitAPI.InAppBrowserPrivacy.AppBoundDomainAllowsServiceWorkers is a
consistent failure
https://bugs.webkit.org/show_bug.cgi?id=249723
<rdar://problem/103601970>
Reviewed by Brady Eidson.
There was a race condition because we were assuming that
SWServer::addRegistrationFromStore always completes immediately.
This is true most of the time, except during process startup. So if we remove
all service worker registrations as the first
thing we do with a network process, sometimes we would see a call to
SWServer::addRegistration after we thought we had completed
removing all the service worker registrations, but only if
m_hasReceivedAppBoundDomains is false. This was seen by the API
test TestWebKitAPI.InAppBrowserPrivacy.AppBoundDomainAllowsServiceWorkers
running after a test that left a service worker
registration on the disk.
* Source/WebCore/workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::openSQLiteDatabase):
(WebCore::RegistrationDatabase::importRecordsIfNecessary):
(WebCore::RegistrationDatabase::schedulePushChanges):
(WebCore::RegistrationDatabase::doPushChanges):
(WebCore::RegistrationDatabase::doPushChangesWithOpenDatabase):
(WebCore::RegistrationDatabase::importRecords):
(WebCore::RegistrationDatabase::addRegistrationToStore):
(WebCore::RegistrationDatabase::databaseFailedToOpen):
(WebCore::RegistrationDatabase::databaseOpenedAndRecordsImported):
* Source/WebCore/workers/service/server/RegistrationDatabase.h:
* Source/WebCore/workers/service/server/RegistrationStore.cpp:
(WebCore::RegistrationStore::addRegistrationFromDatabase):
* Source/WebCore/workers/service/server/RegistrationStore.h:
* Source/WebCore/workers/service/server/SWServer.cpp:
(WebCore::SWServer::addRegistrationFromStore):
* Source/WebCore/workers/service/server/SWServer.h:
Canonical link: https://commits.webkit.org/258268@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes