[webkit-changes] [WebKit/WebKit] 6cb501: "Exceeded storage quota" error even with unlimited...

Timothy Hatcher noreply at github.com
Mon Sep 9 19:44:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6cb5017d237ef7cb898582a22f05acca22322845
      https://github.com/WebKit/WebKit/commit/6cb5017d237ef7cb898582a22f05acca22322845
  Author: Timothy Hatcher <timothy at apple.com>
  Date:   2024-09-09 (Mon, 09 Sep 2024)

  Changed paths:
    M Source/WebKit/Shared/Extensions/WebExtensionConstants.h
    M Source/WebKit/Shared/Extensions/_WKWebExtensionSQLiteStatement.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIStorageCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h

  Log Message:
  -----------
  "Exceeded storage quota" error even with unlimitedStorage permission.
https://webkit.org/b/279385
rdar://131762857

Reviewed by Brian Weinstein.

The `webExtensionUnlimitedStorageQuotaBytes` global was incorrectly defined as a `double`, while
`quotaForStorageType()` returns a `size_t`. This mismatch caused type truncation issues, leading
to the quota check failing.

Additionally, a crash was occurring when deleting the last storage value. The issue was due to
finalizing an SQLite statement asynchronously after the database had been closed and deleted.

* Source/WebKit/Shared/Extensions/WebExtensionConstants.h:
* Source/WebKit/Shared/Extensions/_WKWebExtensionSQLiteStatement.mm:
(-[_WKWebExtensionSQLiteStatement dealloc]): Make sure the database is not closed.
* Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIStorageCocoa.mm:
(WebKit::WebExtensionContext::storageSet): Fix typo for quotaForStorageType.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::quotaForStorageType): Renamed to fix typo.
(WebKit::WebExtensionContext::quoataForStorageType): Deleted.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:

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