[webkit-changes] [WebKit/WebKit] 76179a: DeviceIdHashSalt data may not be removed

Sihui noreply at github.com
Fri Apr 14 11:46:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 76179a575826b84d9e5ebf74436bb2307e1d46e4
      https://github.com/WebKit/WebKit/commit/76179a575826b84d9e5ebf74436bb2307e1d46e4
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

  Changed paths:
    M Source/WebKit/UIProcess/DeviceIdHashSaltStorage.cpp
    M Source/WebKit/UIProcess/DeviceIdHashSaltStorage.h
    M Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm

  Log Message:
  -----------
  DeviceIdHashSalt data may not be removed
https://bugs.webkit.org/show_bug.cgi?id=255174
rdar://106879064

Reviewed by Youenn Fablet.

When DeviceIdHashSaltStorage performs data deletion, it checks whether target origin is present; if not, it will skip
the deletion. However, DeviceIdHashSaltStorage does not wait until m_deviceIdHashSaltForOrigins is loaded from disk
before checking. This patch fixes this by ensuring check happens after m_deviceIdHashSaltForOrigins is loaded.

API test: WebKit.DeviceIdHashSaltsRemoval

* Source/WebKit/UIProcess/DeviceIdHashSaltStorage.cpp:
(WebKit::DeviceIdHashSaltStorage::~DeviceIdHashSaltStorage):
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigins):
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltOriginsModifiedSince):
* Source/WebKit/UIProcess/DeviceIdHashSaltStorage.h:
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:
(-[GetUserMeidaNavigationMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):

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




More information about the webkit-changes mailing list