[webkit-changes] [WebKit/WebKit] 51b371: Cannot manage extension storage with WebKit extens...

kiaraarose noreply at github.com
Tue Mar 12 14:47:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 51b371557ac72cf9ffaf6db5b1f90b90c2472704
      https://github.com/WebKit/WebKit/commit/51b371557ac72cf9ffaf6db5b1f90b90c2472704
  Author: Kiara Rose <kiara_rose at apple.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M Source/WebKit/Shared/Extensions/_WKWebExtensionSQLiteStore.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfigurationPrivate.h
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerConfigurationCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
    M Source/WebKit/UIProcess/Extensions/WebExtensionController.h

  Log Message:
  -----------
  Cannot manage extension storage with WebKit extensions in Safari
https://bugs.webkit.org/show_bug.cgi?id=270869
rdar://124037961

Reviewed by Timothy Hatcher.

Update methods for fetching and removing data records. Since it's not guarenteed the context
will be loaded, don't refer to the controller's map of extension context. Instead, do a direct
comparision with the uniqueIdentifier from the context passed to determine if a match is found.

Also, update _storageDirectoryPath so that a custom storage path can be set.

* Source/WebKit/Shared/Extensions/_WKWebExtensionSQLiteStore.mm:
(-[_WKWebExtensionSQLiteStore _deleteDatabaseFileAtURL:reopenDatabase:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.mm:
(-[_WKWebExtensionControllerConfiguration _setStorageDirectoryPath:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfigurationPrivate.h:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::readDisplayNameFromState):
(WebKit::WebExtensionContext::invalidateStorage):
Make this public so it can be used after sql dbs are closed when data records are removed.
(WebKit::WebExtensionContext::readDisplayNameAndLastBaseURLFromState): Deleted.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm:
(WebKit::WebExtensionController::getDataRecords):
(WebKit::WebExtensionController::getDataRecord):
(WebKit::WebExtensionController::sqliteStore):
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerConfigurationCocoa.mm:
(WebKit::WebExtensionControllerConfiguration::createStorageDirectoryPath):
Convert identifier back to uppercase after toString(). This was causing a bug where
a new (lowercased) directory would be used for extension storage.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Source/WebKit/UIProcess/Extensions/WebExtensionController.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list