Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fcde62dc8703e095470af862cc34e7a3d45f21b8
https://github.com/WebKit/WebKit/commit/fcde62dc8703e095470af862cc34e7a3d45f21b8
Author: Elijah Sawyers <[email protected]>
Date: 2025-10-09 (Thu, 09 Oct 2025)
Changed paths:
M Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.cpp
M Source/WebKit/Shared/Extensions/WebExtensionSQLiteStore.cpp
M Source/WebKit/Shared/Extensions/WebExtensionSQLiteStore.h
M
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDeclarativeNetRequest.mm
Log Message:
-----------
Unable to remove all dynamic or session rules
https://bugs.webkit.org/show_bug.cgi?id=300415
rdar://162148560
rdar://162235623
Reviewed by Timothy Hatcher and Brian Weinstein.
This patch fixes a couple of bugs:
First, and most simple, is that if there are any errors reported when executing
a SQL command, we'd
see infinite recursion leading to a crash. This was simply caused by the wrong
method with a similar
signature being called recursively.
Second, all dynamic and session rules couldn't be removed because we'd try to
commit a savepoint
after deleting the database (which happens after all rules are removed). This
led to the crash I
mentioned above. We should keep a bool set that indicates whether or not
savepoints are valid, which
is set to false when the database is deleted and true when a new savepoint is
created.
Test:
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDeclarativeNetRequest.mm
* Source/WebKit/Shared/Extensions/WebExtensionSQLiteDatabase.cpp:
(WebExtensionSQLiteDatabase::reportErrorWithCode):
Remove the infinite recursion.
* Source/WebKit/Shared/Extensions/WebExtensionSQLiteStore.cpp:
(WebKit::WebExtensionSQLiteStore::deleteDatabase):
(WebKit::WebExtensionSQLiteStore::createSavepoint):
(WebKit::WebExtensionSQLiteStore::commitSavepoint):
(WebKit::WebExtensionSQLiteStore::rollbackToSavepoint):
* Source/WebKit/Shared/Extensions/WebExtensionSQLiteStore.h:
Add the savepoint validity checks.
*
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDeclarativeNetRequest.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIDeclarativeNetRequest,
RemoveSessionRules)):
(TestWebKitAPI::TEST(WKWebExtensionAPIDeclarativeNetRequest,
RemoveDynamicRules)):
Update tests that were reproducing both issues.
Canonical link: https://commits.webkit.org/301263@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes