[webkit-changes] [WebKit/WebKit] 04246e: Create DeviceIdHashSaltStorage only when it is nec...

Sihui noreply at github.com
Thu Mar 14 14:38:18 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 04246e312edc0a671e4d7fddc08c43231641aee8
      https://github.com/WebKit/WebKit/commit/04246e312edc0a671e4d7fddc08c43231641aee8
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
    M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h

  Log Message:
  -----------
  Create DeviceIdHashSaltStorage only when it is necessary
https://bugs.webkit.org/show_bug.cgi?id=270946
rdar://124563708

Reviewed by Chris Dumez.

Currently WebsiteDataStore creates DeviceIdHashSaltStorage unconditionally at initialization, and
DeviceIdHashSaltStorage reads all data into memory at initialization. To reduce memory use and avoid unnecessary I/O
operations, this patch makes sure DeviceIdHashSaltStorage is created when it's going to used.

* Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::grantRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::ensureDeviceIdHashSaltStorage):
(WebKit::WebsiteDataStore::ensureProtectedDeviceIdHashSaltStorage):
(WebKit::WebsiteDataStore::protectedDeviceIdHashSaltStorage): Deleted.
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::deviceIdHashSaltStorage): Deleted.

Canonical link: https://commits.webkit.org/276119@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