Title: [236546] trunk
Revision
236546
Author
[email protected]
Date
2018-09-27 08:57:08 -0700 (Thu, 27 Sep 2018)

Log Message

The WebContent process should not process incoming IPC while waiting for a sync IPC reply
https://bugs.webkit.org/show_bug.cgi?id=184183
<rdar://problem/36800576>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Drop test infrastructure for the DoNotProcessIncomingMessagesWhenWaitingForSyncReply IPC::SendOption
given that this SendOption was removed from this patch.

* page/ChromeClient.h:
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

In recent years, we have experienced re-entrancy bugs/crashes in WebCore due to the WebContent process
processing unrelated incoming synchronous IPC when waiting for a reply to one of its synchronous IPC
to another process. In order to deal with this, we introduced a DoNotProcessIncomingMessagesWhenWaitingForSyncReply
IPC::SendOption which we used on sendSync() calls where we knew re-entering would be unsafe. However,
it turns out to be needed for a lot of the WebProcess's sync IPC and it is error-prone. In order to
address the issue, we've decided to update the WebContent process behavior so that it processes all its
IPC in order (not matter if synchronous or not) and thus so that we never dispatch unrelated synchronous
IPC while waiting for a synchronous IPC reply, expect in cases where it would cause a deadlock.

As a result, this patch also drops support for the DoNotProcessIncomingMessagesWhenWaitingForSyncReply
IPC::SendOption which is no longer needed and has some code complexity.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendSyncMessage):
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:
(IPC::Connection::sendSync):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::StorageToWebProcessConnection):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postSynchronousMessage):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::responseFromResourceLoadIdentifier):
(WebKit::WebLoaderStrategy::intermediateLoadInformationFromResourceLoadIdentifier):
(WebKit::WebLoaderStrategy::networkMetricsFromResourceLoadIdentifier):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::destroy):
(WebKit::PluginProxy::supportsSnapshotting const):
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::populatePluginCache):
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::WebSWClientConnection):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::rootViewToScreen):
* WebProcess/WebProcess.cpp:
(WebKit::getNetworkProcessConnection):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

LayoutTests:

Drop test for the DoNotProcessIncomingMessagesWhenWaitingForSyncReply IPC::SendOption as it was
removed in this patch. This SendOption is no longer useful because it is now the default behavior
for the WebContent process.

* fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt: Removed.
* fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (236545 => 236546)


--- trunk/LayoutTests/ChangeLog	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/LayoutTests/ChangeLog	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1,3 +1,18 @@
+2018-09-27  Chris Dumez  <[email protected]>
+
+        The WebContent process should not process incoming IPC while waiting for a sync IPC reply
+        https://bugs.webkit.org/show_bug.cgi?id=184183
+        <rdar://problem/36800576>
+
+        Reviewed by Ryosuke Niwa.
+
+        Drop test for the DoNotProcessIncomingMessagesWhenWaitingForSyncReply IPC::SendOption as it was
+        removed in this patch. This SendOption is no longer useful because it is now the default behavior
+        for the WebContent process.
+
+        * fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt: Removed.
+        * fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html: Removed.
+
 2018-09-27  Philippe Normand  <[email protected]>
 
         Unreviewed GTK WebAudio rebaseline.

Deleted: trunk/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt (236545 => 236546)


--- trunk/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1,10 +0,0 @@
-Tests that the WebProcess does not process incoming sync IPC while waiting for a sync reply.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Did not crash
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html (236545 => 236546)


--- trunk/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src=""
-<script>
-description("Tests that the WebProcess does not process incoming sync IPC while waiting for a sync reply.");
-
-internals.testIncomingSyncIPCMessageWhileWaitingForSyncReply();
-testPassed("Did not crash");
-</script>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (236545 => 236546)


--- trunk/Source/WebCore/ChangeLog	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebCore/ChangeLog	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1,3 +1,19 @@
+2018-09-27  Chris Dumez  <[email protected]>
+
+        The WebContent process should not process incoming IPC while waiting for a sync IPC reply
+        https://bugs.webkit.org/show_bug.cgi?id=184183
+        <rdar://problem/36800576>
+
+        Reviewed by Ryosuke Niwa.
+
+        Drop test infrastructure for the DoNotProcessIncomingMessagesWhenWaitingForSyncReply IPC::SendOption
+        given that this SendOption was removed from this patch.
+
+        * page/ChromeClient.h:
+        * testing/Internals.cpp:
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2018-09-27  Philippe Normand  <[email protected]>
 
         Unreviewed, GTK Ubuntu LTS build fix attempt after r236396.

Modified: trunk/Source/WebCore/page/ChromeClient.h (236545 => 236546)


--- trunk/Source/WebCore/page/ChromeClient.h	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebCore/page/ChromeClient.h	2018-09-27 15:57:08 UTC (rev 236546)
@@ -486,8 +486,6 @@
     virtual void didInsertMenuItemElement(HTMLMenuItemElement&) { }
     virtual void didRemoveMenuItemElement(HTMLMenuItemElement&) { }
 
-    virtual void testIncomingSyncIPCMessageWhileWaitingForSyncReply() { }
-
     virtual String signedPublicKeyAndChallengeString(unsigned, const String&, const URL&) const { return emptyString(); }
 
     virtual bool isViewVisible() { return true; }

Modified: trunk/Source/WebCore/testing/Internals.cpp (236545 => 236546)


--- trunk/Source/WebCore/testing/Internals.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebCore/testing/Internals.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -4633,13 +4633,6 @@
     timeline.setCurrentTime(Seconds::fromMilliseconds(currentTime));
 }
 
-void Internals::testIncomingSyncIPCMessageWhileWaitingForSyncReply()
-{
-    ASSERT(contextDocument());
-    ASSERT(contextDocument()->page());
-    contextDocument()->page()->chrome().client().testIncomingSyncIPCMessageWhileWaitingForSyncReply();
-}
-
 #if ENABLE(APPLE_PAY)
 MockPaymentCoordinator& Internals::mockPaymentCoordinator() const
 {

Modified: trunk/Source/WebCore/testing/Internals.h (236545 => 236546)


--- trunk/Source/WebCore/testing/Internals.h	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebCore/testing/Internals.h	2018-09-27 15:57:08 UTC (rev 236546)
@@ -704,8 +704,6 @@
     void pauseTimeline(AnimationTimeline&);
     void setTimelineCurrentTime(AnimationTimeline&, double);
 
-    void testIncomingSyncIPCMessageWhileWaitingForSyncReply();
-
 #if ENABLE(WEB_AUTHN)
     MockAuthenticatorCoordinator& mockAuthenticatorCoordinator() const;
 #endif

Modified: trunk/Source/WebCore/testing/Internals.idl (236545 => 236546)


--- trunk/Source/WebCore/testing/Internals.idl	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebCore/testing/Internals.idl	2018-09-27 15:57:08 UTC (rev 236546)
@@ -680,8 +680,6 @@
     [Conditional=SERVICE_WORKER] void terminateServiceWorker(ServiceWorker worker);
     [Conditional=SERVICE_WORKER] boolean hasServiceWorkerConnection();
 
-    void testIncomingSyncIPCMessageWhileWaitingForSyncReply();
-
     [EnabledAtRuntime=WebAnimations] DOMString timelineDescription(AnimationTimeline timeline);
     [EnabledAtRuntime=WebAnimations] void pauseTimeline(AnimationTimeline timeline);
     [EnabledAtRuntime=WebAnimations] void setTimelineCurrentTime(AnimationTimeline timeline, double currentTime);

Modified: trunk/Source/WebKit/ChangeLog (236545 => 236546)


--- trunk/Source/WebKit/ChangeLog	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/ChangeLog	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1,3 +1,65 @@
+2018-09-27  Chris Dumez  <[email protected]>
+
+        The WebContent process should not process incoming IPC while waiting for a sync IPC reply
+        https://bugs.webkit.org/show_bug.cgi?id=184183
+        <rdar://problem/36800576>
+
+        Reviewed by Ryosuke Niwa.
+
+        In recent years, we have experienced re-entrancy bugs/crashes in WebCore due to the WebContent process
+        processing unrelated incoming synchronous IPC when waiting for a reply to one of its synchronous IPC
+        to another process. In order to deal with this, we introduced a DoNotProcessIncomingMessagesWhenWaitingForSyncReply
+        IPC::SendOption which we used on sendSync() calls where we knew re-entering would be unsafe. However,
+        it turns out to be needed for a lot of the WebProcess's sync IPC and it is error-prone. In order to
+        address the issue, we've decided to update the WebContent process behavior so that it processes all its
+        IPC in order (not matter if synchronous or not) and thus so that we never dispatch unrelated synchronous
+        IPC while waiting for a synchronous IPC reply, expect in cases where it would cause a deadlock.
+
+        As a result, this patch also drops support for the DoNotProcessIncomingMessagesWhenWaitingForSyncReply
+        IPC::SendOption which is no longer needed and has some code complexity.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
+        * Platform/IPC/Connection.cpp:
+        (IPC::Connection::sendSyncMessage):
+        (IPC::Connection::waitForSyncReply):
+        * Platform/IPC/Connection.h:
+        (IPC::Connection::sendSync):
+        * PluginProcess/WebProcessConnection.cpp:
+        (WebKit::WebProcessConnection::WebProcessConnection):
+        * StorageProcess/StorageToWebProcessConnection.cpp:
+        (WebKit::StorageToWebProcessConnection::StorageToWebProcessConnection):
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::connectionWillOpen):
+        * UIProcess/WebProcessProxy.h:
+        * UIProcess/WebProcessProxy.messages.in:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::postSynchronousMessage):
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::loadResourceSynchronously):
+        (WebKit::WebLoaderStrategy::responseFromResourceLoadIdentifier):
+        (WebKit::WebLoaderStrategy::intermediateLoadInformationFromResourceLoadIdentifier):
+        (WebKit::WebLoaderStrategy::networkMetricsFromResourceLoadIdentifier):
+        * WebProcess/Plugins/PluginProxy.cpp:
+        (WebKit::PluginProxy::destroy):
+        (WebKit::PluginProxy::supportsSnapshotting const):
+        * WebProcess/Plugins/WebPluginInfoProvider.cpp:
+        (WebKit::WebPluginInfoProvider::populatePluginCache):
+        * WebProcess/Storage/WebSWClientConnection.cpp:
+        (WebKit::WebSWClientConnection::WebSWClientConnection):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::rootViewToScreen):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::getNetworkProcessConnection):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+
 2018-09-27  Antoine Quint  <[email protected]>
 
         [Web Animations] Turn Web Animations with CSS integration on

Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (236545 => 236546)


--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -79,6 +79,11 @@
 #endif
 {
     RELEASE_ASSERT(RunLoop::isMain());
+
+    // Use this flag to force synchronous messages to be treated as asynchronous messages in the WebProcess.
+    // Otherwise, the WebProcess would process incoming synchronous IPC while waiting for a synchronous IPC
+    // reply from the Network process, which would be unsafe.
+    m_connection->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
     m_connection->open();
 }
 

Modified: trunk/Source/WebKit/Platform/IPC/Connection.cpp (236545 => 236546)


--- trunk/Source/WebKit/Platform/IPC/Connection.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/Platform/IPC/Connection.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -544,11 +544,6 @@
 
     ++m_inSendSyncCount;
 
-    // If the caller has set the DoNotProcessIncomingMessagesWhenWaitingForSyncReply then we need to make sure the destination process
-    // dispatches this message even when waiting for a sync reply. It could cause deadlocks otherwise.
-    if (sendSyncOptions.contains(SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
-        encoder->setShouldDispatchMessageWhenWaitingForSyncReply(true);
-
     // First send the message.
     sendMessage(WTFMove(encoder), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);
 
@@ -582,8 +577,7 @@
     bool timedOut = false;
     while (!timedOut) {
         // First, check if we have any messages that we need to process.
-        if (!sendSyncOptions.contains(SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
-            SyncMessageState::singleton().dispatchMessages(nullptr);
+        SyncMessageState::singleton().dispatchMessages(nullptr);
         
         {
             LockHolder locker(m_syncReplyStateMutex);

Modified: trunk/Source/WebKit/Platform/IPC/Connection.h (236545 => 236546)


--- trunk/Source/WebKit/Platform/IPC/Connection.h	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/Platform/IPC/Connection.h	2018-09-27 15:57:08 UTC (rev 236546)
@@ -67,8 +67,6 @@
     // Use this to inform that this sync call will suspend this process until the user responds with input.
     InformPlatformProcessWillSuspend = 1 << 0,
     UseFullySynchronousModeForTesting = 1 << 1,
-
-    DoNotProcessIncomingMessagesWhenWaitingForSyncReply = 1 << 2,
 };
 
 enum class WaitForOption {
@@ -436,9 +434,6 @@
 {
     COMPILE_ASSERT(T::isSync, SyncMessageExpected);
 
-    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(sendSyncOptions.contains(SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)
-        || WebCore::ScriptDisallowedScope::isEventAllowedInMainThread());
-
     uint64_t syncRequestID = 0;
     std::unique_ptr<Encoder> encoder = createSyncMessageEncoder(T::receiverName(), T::name(), destinationID, syncRequestID);
 

Modified: trunk/Source/WebKit/PluginProcess/WebProcessConnection.cpp (236545 => 236546)


--- trunk/Source/WebKit/PluginProcess/WebProcessConnection.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/PluginProcess/WebProcessConnection.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -67,6 +67,9 @@
     m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
     m_npRemoteObjectMap = NPRemoteObjectMap::create(m_connection.get());
 
+    // Use this flag to force synchronous messages to be treated as asynchronous messages in the WebProcess.
+    // Otherwise, the WebProcess would process incoming synchronous IPC while waiting for a synchronous IPC
+    // reply from the Plugin process, which would be unsafe.
     m_connection->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
     m_connection->open();
 }

Modified: trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp (236545 => 236546)


--- trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -45,6 +45,9 @@
 StorageToWebProcessConnection::StorageToWebProcessConnection(IPC::Connection::Identifier connectionIdentifier)
     : m_connection(IPC::Connection::createServerConnection(connectionIdentifier, *this))
 {
+    // Use this flag to force synchronous messages to be treated as asynchronous messages in the WebProcess.
+    // Otherwise, the WebProcess would process incoming synchronous IPC while waiting for a synchronous IPC
+    // reply from the storage process, which would be unsafe.
     m_connection->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
     m_connection->open();
 }

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (236545 => 236546)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -205,6 +205,11 @@
     // if one of the WebProcesses misbehaves.
     connection.enableIncomingMessagesThrottling();
 
+    // Use this flag to force synchronous messages to be treated as asynchronous messages in the WebProcess.
+    // Otherwise, the WebProcess would process incoming synchronous IPC while waiting for a synchronous IPC
+    // reply from the UIProcess, which would be unsafe.
+    connection.setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
+
 #if ENABLE(SEC_ITEM_SHIM)
     SecItemShimProxy::singleton().initializeConnection(connection);
 #endif
@@ -904,15 +909,6 @@
     }
 }
 
-void WebProcessProxy::testIncomingSyncIPCMessageWhileWaitingForSyncReply(bool& handled)
-{
-    // Send Synchronous IPC back to the WebProcess while it is waiting for a sync reply from us.
-    // This should time out.
-    bool didSyncIPCsucceed = sendSync(Messages::WebProcess::SyncIPCMessageWhileWaitingForSyncReplyForTesting(), Messages::WebProcess::SyncIPCMessageWhileWaitingForSyncReplyForTesting::Reply(), 0, 100_ms);
-    RELEASE_ASSERT(!didSyncIPCsucceed);
-    handled = true;
-}
-
 void WebProcessProxy::updateTextCheckerState()
 {
     if (canSendMessage())

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (236545 => 236546)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2018-09-27 15:57:08 UTC (rev 236546)
@@ -142,8 +142,6 @@
 
     VisibleWebPageToken visiblePageToken() const;
 
-    void testIncomingSyncIPCMessageWhileWaitingForSyncReply(bool& handled);
-
     void updateTextCheckerState();
 
     void willAcquireUniversalFileReadSandboxExtension() { m_mayHaveUniversalFileReadSandboxExtension = true; }

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in (236545 => 236546)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in	2018-09-27 15:57:08 UTC (rev 236546)
@@ -47,8 +47,6 @@
     DidExceedInactiveMemoryLimit()
     DidExceedCPULimit()
 
-    TestIncomingSyncIPCMessageWhileWaitingForSyncReply() -> (bool handled)
-
     StopResponsivenessTimer()
 
     DidReceiveMainThreadPing()

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -139,7 +139,7 @@
 
     auto& webProcess = WebProcess::singleton();
     if (!webProcess.parentProcessConnection()->sendSync(Messages::WebProcessPool::HandleSynchronousMessage(messageName, UserData(webProcess.transformObjectsToHandles(messageBody))),
-        Messages::WebProcessPool::HandleSynchronousMessage::Reply(returnUserData), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
+        Messages::WebProcessPool::HandleSynchronousMessage::Reply(returnUserData), 0))
         returnData = nullptr;
     else
         returnData = webProcess.transformHandlesToObjects(returnUserData.object());

Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -539,7 +539,7 @@
 
     HangDetectionDisabler hangDetectionDisabler;
 
-    if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)) {
+    if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
         RELEASE_LOG_ERROR_IF_ALLOWED(loadParameters.sessionID, "loadResourceSynchronously: failed sending synchronous network process message (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier);
         if (auto* page = webPage->corePage())
             page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey(), WebCore::ShouldSample::No);
@@ -682,7 +682,7 @@
 ResourceResponse WebLoaderStrategy::responseFromResourceLoadIdentifier(uint64_t resourceLoadIdentifier)
 {
     ResourceResponse response;
-    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationResponse { resourceLoadIdentifier }, Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationResponse::Reply { response }, 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
+    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationResponse { resourceLoadIdentifier }, Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationResponse::Reply { response }, 0);
     return response;
 }
 
@@ -689,7 +689,7 @@
 Vector<NetworkTransactionInformation> WebLoaderStrategy::intermediateLoadInformationFromResourceLoadIdentifier(uint64_t resourceLoadIdentifier)
 {
     Vector<NetworkTransactionInformation> information;
-    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::GetNetworkLoadIntermediateInformation { resourceLoadIdentifier }, Messages::NetworkConnectionToWebProcess::GetNetworkLoadIntermediateInformation::Reply { information }, 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
+    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::GetNetworkLoadIntermediateInformation { resourceLoadIdentifier }, Messages::NetworkConnectionToWebProcess::GetNetworkLoadIntermediateInformation::Reply { information }, 0);
     return information;
 }
 
@@ -696,7 +696,7 @@
 NetworkLoadMetrics WebLoaderStrategy::networkMetricsFromResourceLoadIdentifier(uint64_t resourceLoadIdentifier)
 {
     NetworkLoadMetrics networkMetrics;
-    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::TakeNetworkLoadInformationMetrics { resourceLoadIdentifier }, Messages::NetworkConnectionToWebProcess::TakeNetworkLoadInformationMetrics::Reply { networkMetrics }, 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
+    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::TakeNetworkLoadInformationMetrics { resourceLoadIdentifier }, Messages::NetworkConnectionToWebProcess::TakeNetworkLoadInformationMetrics::Reply { networkMetrics }, 0);
     return networkMetrics;
 }
 

Modified: trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -197,7 +197,7 @@
 
     // Although this message is sent synchronously, the Plugin process replies immediately (before performing any tasks) so this is only waiting for
     // confirmation that the Plugin process received the DestroyPlugin message.
-    m_connection->connection()->sendSync(Messages::WebProcessConnection::DestroyPlugin(m_pluginInstanceID, m_waitingOnAsynchronousInitialization), Messages::WebProcessConnection::DestroyPlugin::Reply(), 0, 1_s, IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
+    m_connection->connection()->sendSync(Messages::WebProcessConnection::DestroyPlugin(m_pluginInstanceID, m_waitingOnAsynchronousInitialization), Messages::WebProcessConnection::DestroyPlugin::Reply(), 0, 1_s);
     m_connection->removePluginProxy(this);
 }
 
@@ -233,7 +233,7 @@
         return false;
 
     bool isSupported = false;
-    if (m_connection && !m_connection->connection()->sendSync(Messages::PluginControllerProxy::SupportsSnapshotting(), Messages::PluginControllerProxy::SupportsSnapshotting::Reply(isSupported), m_pluginInstanceID, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
+    if (m_connection && !m_connection->connection()->sendSync(Messages::PluginControllerProxy::SupportsSnapshotting(), Messages::PluginControllerProxy::SupportsSnapshotting::Reply(isSupported), m_pluginInstanceID))
         return false;
 
     return isSupported;

Modified: trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -149,8 +149,7 @@
         HangDetectionDisabler hangDetectionDisabler;
 
         if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins),
-            Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0,
-            Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
+            Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0))
             return;
 
         m_shouldRefreshPlugins = false;

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -57,7 +57,7 @@
     , m_swOriginTable(makeUniqueRef<WebSWOriginTable>())
 {
     ASSERT(sessionID.isValid());
-    bool result = sendSync(Messages::NetworkConnectionToWebProcess::EstablishSWServerConnection(sessionID), Messages::NetworkConnectionToWebProcess::EstablishSWServerConnection::Reply(m_identifier), Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
+    bool result = sendSync(Messages::NetworkConnectionToWebProcess::EstablishSWServerConnection(sessionID), Messages::NetworkConnectionToWebProcess::EstablishSWServerConnection::Reply(m_identifier));
 
     ASSERT_UNUSED(result, result);
 }

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -709,13 +709,6 @@
     m_page.sendSync(Messages::WebPageProxy::PrintFrame(webFrame->frameID()), Messages::WebPageProxy::PrintFrame::Reply(), Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend);
 }
 
-void WebChromeClient::testIncomingSyncIPCMessageWhileWaitingForSyncReply()
-{
-    bool wasHandled = false;
-    WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::TestIncomingSyncIPCMessageWhileWaitingForSyncReply(), Messages::WebProcessProxy::TestIncomingSyncIPCMessageWhileWaitingForSyncReply::Reply(wasHandled), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
-    RELEASE_ASSERT(wasHandled);
-}
-
 void WebChromeClient::exceededDatabaseQuota(Frame& frame, const String& databaseName, DatabaseDetails details)
 {
     WebFrame* webFrame = WebFrame::fromCoreFrame(frame);

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h	2018-09-27 15:57:08 UTC (rev 236546)
@@ -130,8 +130,6 @@
     
     void print(WebCore::Frame&) final;
 
-    void testIncomingSyncIPCMessageWhileWaitingForSyncReply() final;
-
     void exceededDatabaseQuota(WebCore::Frame&, const String& databaseName, WebCore::DatabaseDetails) final;
 
     void reachedMaxAppCacheSize(int64_t spaceNeeded) final;

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1381,7 +1381,7 @@
         return;
 
     HasInsecureContent hasInsecureContent;
-    if (webPage->sendSync(Messages::WebPageProxy::HasInsecureContent(), Messages::WebPageProxy::HasInsecureContent::Reply(hasInsecureContent), Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
+    if (webPage->sendSync(Messages::WebPageProxy::HasInsecureContent(), Messages::WebPageProxy::HasInsecureContent::Reply(hasInsecureContent)))
         cachedFrame->setHasInsecureContent(hasInsecureContent);
 }
 

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -139,7 +139,7 @@
 {
     String cookieString;
     bool secureCookiesAccessed = false;
-    if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(sessionID, firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(cookieString, secureCookiesAccessed), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply))
+    if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(sessionID, firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(cookieString, secureCookiesAccessed), 0))
         return { String(), false };
     return { cookieString, secureCookiesAccessed };
 }

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -2935,7 +2935,7 @@
 IntRect WebPage::rootViewToScreen(const IntRect& rect)
 {
     IntRect screenRect;
-    sendSync(Messages::WebPageProxy::RootViewToScreen(rect), Messages::WebPageProxy::RootViewToScreen::Reply(screenRect), Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
+    sendSync(Messages::WebPageProxy::RootViewToScreen(rect), Messages::WebPageProxy::RootViewToScreen::Reply(screenRect));
     return screenRect;
 }
     

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2018-09-27 15:57:08 UTC (rev 236546)
@@ -1024,10 +1024,6 @@
     parentProcessConnection()->send(Messages::WebProcessProxy::DidReceiveBackgroundResponsivenessPing(), 0);
 }
 
-void WebProcess::syncIPCMessageWhileWaitingForSyncReplyForTesting()
-{
-}
-
 void WebProcess::didTakeAllMessagesForPort(Vector<MessageWithMessagePorts>&& messages, uint64_t messageCallbackIdentifier, uint64_t messageBatchIdentifier)
 {
     WebMessagePortChannelProvider::singleton().didTakeAllMessagesForPort(WTFMove(messages), messageCallbackIdentifier, messageBatchIdentifier);
@@ -1102,7 +1098,7 @@
 static IPC::Connection::Identifier getNetworkProcessConnection(IPC::Connection& connection)
 {
     IPC::Attachment encodedConnectionIdentifier;
-    if (!connection.sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(), Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0, Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)) {
+    if (!connection.sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(), Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0)) {
 #if PLATFORM(GTK) || PLATFORM(WPE)
         // GTK+ and WPE ports don't exit on send sync message failure.
         // In this particular case, the network process can be terminated by the UI process while the

Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebProcess.h	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h	2018-09-27 15:57:08 UTC (rev 236546)
@@ -303,8 +303,6 @@
     void mainThreadPing();
     void backgroundResponsivenessPing();
 
-    void syncIPCMessageWhileWaitingForSyncReplyForTesting();
-
     void didTakeAllMessagesForPort(Vector<WebCore::MessageWithMessagePorts>&& messages, uint64_t messageCallbackIdentifier, uint64_t messageBatchIdentifier);
     void checkProcessLocalPortForActivity(const WebCore::MessagePortIdentifier&, uint64_t callbackIdentifier);
     void didCheckRemotePortForActivity(uint64_t callbackIdentifier, bool hasActivity);

Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (236545 => 236546)


--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2018-09-27 12:51:09 UTC (rev 236545)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2018-09-27 15:57:08 UTC (rev 236546)
@@ -113,8 +113,6 @@
     GamepadDisconnected(unsigned index)
 #endif
 
-    SyncIPCMessageWhileWaitingForSyncReplyForTesting() -> ()
-
 #if USE(SOUP)
     SetNetworkProxySettings(struct WebCore::SoupNetworkProxySettings settings)
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to