[webkit-changes] [WebKit/WebKit] 9efb18: Don't terminate web process when showing content-f...
Alex Christensen
noreply at github.com
Thu Feb 2 22:47:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9efb18ab395717c170f060d3ccfaf4f737703711
https://github.com/WebKit/WebKit/commit/9efb18ab395717c170f060d3ccfaf4f737703711
Author: Alex Christensen <achristensen at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Source/WebCore/loader/ContentFilter.cpp
M Source/WebCore/loader/ContentFilter.h
M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm
Log Message:
-----------
Don't terminate web process when showing content-filter-provided data that loads subresources
https://bugs.webkit.org/show_bug.cgi?id=251649
rdar://104928565
Reviewed by Geoffrey Garen and Andy Estes.
When a content filter blocks a load, it provides HTML to load instead.
It loads this HTML as substitute data with a base URL of blockedPageURL().
If this HTML tries to load anything, we would terminate the web content
process because it was claiming a firstPartyForCookies the network process
was unaware of. This makes the network process aware in this case.
Covered by an API test.
* Source/WebCore/loader/ContentFilter.cpp:
(WebCore::ContentFilter::blockedPageURL):
(WebCore::blockedPageURL): Deleted.
* Source/WebCore/loader/ContentFilter.h:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::handleProvisionalLoadFailureFromContentFilter):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(-[LoadAlternateNavigationDelegate webViewWebContentProcessDidTerminate:]):
(TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm:
(-[MockContentFilterEnabler initWithCoder:]):
Canonical link: https://commits.webkit.org/259802@main
More information about the webkit-changes
mailing list