[webkit-changes] [WebKit/WebKit] 05f2eb: Ensure all ServiceWorkerRegistration files and dir...

Sihui noreply at github.com
Thu Jun 8 15:57:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 05f2eb13cce60033cab4180a158f77677ff79cba
      https://github.com/WebKit/WebKit/commit/05f2eb13cce60033cab4180a158f77677ff79cba
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-06-08 (Thu, 08 Jun 2023)

  Changed paths:
    M Source/WebCore/workers/service/server/SWRegistrationDatabase.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm

  Log Message:
  -----------
  Ensure all ServiceWorkerRegistration files and directories are removed when registrations are cleared
https://bugs.webkit.org/show_bug.cgi?id=257857
rdar://110475749

Reviewed by Youenn Fablet.

This patch ensures -shm file, -wal file and empty Script folder are deleted when clearing ServiceWorker registrations,
so that ServiceWorker directory can become empty and also get deleted.

Test: WKWebsiteDataStore.RemoveServiceWorkerData

* Source/WebCore/workers/service/server/SWRegistrationDatabase.cpp:
(WebCore::scriptDirectoryPath):
(WebCore::scriptVersionDirectoryPath):
(WebCore::SWRegistrationDatabase::scriptStorage):
(WebCore::SWRegistrationDatabase::importRegistrations):
(WebCore::SWRegistrationDatabase::clearAllRegistrations):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

Canonical link: https://commits.webkit.org/264998@main




More information about the webkit-changes mailing list