[webkit-changes] [WebKit/WebKit] 67bfc1: NetworkConnectionToWebProcess's MESSAGE_CHECK shou...
Gavin
noreply at github.com
Mon Feb 5 11:15:29 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 67bfc13f4de715fe8d0f671417eb47af4b8eabec
https://github.com/WebKit/WebKit/commit/67bfc13f4de715fe8d0f671417eb47af4b8eabec
Author: Gavin Phillips <gavin.p at apple.com>
Date: 2024-02-05 (Mon, 05 Feb 2024)
Changed paths:
A LayoutTests/ipc/validate-message-check-in-networkconnectiontowebproces-crash-expected.txt
A LayoutTests/ipc/validate-message-check-in-networkconnectiontowebproces-crash.html
A LayoutTests/ipc/validate-message-check-in-networkconnectiontowebprocess-expected.txt
A LayoutTests/ipc/validate-message-check-in-networkconnectiontowebprocess.html
M LayoutTests/platform/wk2/TestExpectations
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
Log Message:
-----------
NetworkConnectionToWebProcess's MESSAGE_CHECK should just be calling into MESSAGE_CHECK_BASE
https://bugs.webkit.org/show_bug.cgi?id=268633
rdar://122191138
Reviewed by Alex Christensen.
We want MESSAGE_CHECK's to kill WebContent and stop processing the
message when m_ignoreInvalidMessageForTesting==false and stop processing
the message when m_ignoreInvalidMessageForTesting==true.
Currently many connections implement their own version of MESSAGE_CHECK
which leads to inconsistent behaviour. By having NetworkConnectionToWebProcess's
MESSAGE_CHECK call into MESSAGE_CHECK_BASE, we should
markCurrentlyDispatchedMessageAsInvalid which should then dispatch
didReceiveInvalidMessage to the connection client when
m_ignoreInvalidMessageForTesting is false. didReceiveInvalidMessage can
then terminate the WebContent process for us.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::createSocketChannel):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOMAsync):
(WebKit::NetworkConnectionToWebProcess::setCookieFromDOMAsync):
(WebKit::NetworkConnectionToWebProcess::domCookiesForHost):
(WebKit::NetworkConnectionToWebProcess::registerInternalFileBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerInternalBlobURLOptionallyFileBacked):
(WebKit::NetworkConnectionToWebProcess::establishSWContextConnection):
(WebKit::NetworkConnectionToWebProcess::logOnBehalfOfWebContent):
Canonical link: https://commits.webkit.org/274106@main
More information about the webkit-changes
mailing list