[webkit-changes] [WebKit/WebKit] cc6d84: Crash at API::getContentRuleListSourceFromMappedFi...
Timothy Hatcher
noreply at github.com
Fri Jan 24 09:39:02 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cc6d84db42845365e98b60c72b9d1e42fd97b953
https://github.com/WebKit/WebKit/commit/cc6d84db42845365e98b60c72b9d1e42fd97b953
Author: Timothy Hatcher <timothy at apple.com>
Date: 2025-01-24 (Fri, 24 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:
-----------
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
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