[webkit-changes] [WebKit/WebKit] f4538a: Cherry-pick 289350 at main (cc6d84db4284). https://bu...
Timothy Hatcher
noreply at github.com
Mon Jan 27 06:46:47 PST 2025
Branch: refs/heads/webkitglib/2.46
Home: https://github.com/WebKit/WebKit
Commit: f4538ae78a3bbc38b70156080f37c904326f7942
https://github.com/WebKit/WebKit/commit/f4538ae78a3bbc38b70156080f37c904326f7942
Author: Timothy Hatcher <timothy at apple.com>
Date: 2025-01-27 (Mon, 27 Jan 2025)
Changed paths:
M Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
M Source/WebKit/UIProcess/API/APIContentRuleListStore.h
M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm
Log Message:
-----------
Cherry-pick 289350 at main (cc6d84db4284). https://bugs.webkit.org/show_bug.cgi?id=286452
Crash at API::getContentRuleListSourceFromMappedFile().
https://webkit.org/b/286452
rdar://141639647
Reviewed by Alex Christensen.
If the app crashed while compiling the content rule list, an invalid header of
all 0xFF bytes would be saved. This causes us to try to recompile on launch,
but our checks were insufficient for this case. Add additional header checks
before reading the file further.
Fixed some stray whitespace in the file.
* Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp:
(API::getContentRuleListSourceFromMappedFile): Check the header values for max().
(API::ContentRuleListStore::invalidateContentRuleListHeader): Added.
* Source/WebKit/UIProcess/API/APIContentRuleListStore.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore _invalidateContentRuleListHeaderForIdentifier:]): Added.
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStorePrivate.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:
(TEST_F(WKContentRuleListStoreTest, InvalidHeader)): Added.
Canonical link: https://commits.webkit.org/289350@main
Canonical link: https://commits.webkit.org/282416.388@webkitglib/2.46
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