Title: [227466] branches/safari-605-branch
Revision
227466
Author
jmarc...@apple.com
Date
2018-01-23 17:09:36 -0800 (Tue, 23 Jan 2018)

Log Message

Revert r227216. rdar://problem/36722508

Modified Paths

Removed Paths

Diff

Modified: branches/safari-605-branch/LayoutTests/ChangeLog (227465 => 227466)


--- branches/safari-605-branch/LayoutTests/ChangeLog	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/LayoutTests/ChangeLog	2018-01-24 01:09:36 UTC (rev 227466)
@@ -1,3 +1,7 @@
+2018-01-23  Jason Marcell  <jmarc...@apple.com>
+
+        Revert r227216. rdar://problem/36722508
+
 2018-01-22  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r227370. rdar://problem/36763189

Deleted: branches/safari-605-branch/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt (227465 => 227466)


--- branches/safari-605-branch/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt	2018-01-24 01:09:36 UTC (rev 227466)
@@ -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: branches/safari-605-branch/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html (227465 => 227466)


--- branches/safari-605-branch/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/LayoutTests/fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html	2018-01-24 01:09:36 UTC (rev 227466)
@@ -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: branches/safari-605-branch/Source/WebCore/ChangeLog (227465 => 227466)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-01-24 01:09:36 UTC (rev 227466)
@@ -1,3 +1,7 @@
+2018-01-23  Jason Marcell  <jmarc...@apple.com>
+
+        Revert r227216. rdar://problem/36722508
+
 2018-01-22  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r227351. rdar://problem/36746029

Modified: branches/safari-605-branch/Source/WebCore/page/ChromeClient.h (227465 => 227466)


--- branches/safari-605-branch/Source/WebCore/page/ChromeClient.h	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebCore/page/ChromeClient.h	2018-01-24 01:09:36 UTC (rev 227466)
@@ -474,8 +474,6 @@
     virtual void didInsertMenuItemElement(HTMLMenuItemElement&) { }
     virtual void didRemoveMenuItemElement(HTMLMenuItemElement&) { }
 
-    virtual void testIncomingSyncIPCMessageWhileWaitingForSyncReply() { }
-
 protected:
     virtual ~ChromeClient() = default;
 };

Modified: branches/safari-605-branch/Source/WebCore/testing/Internals.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebCore/testing/Internals.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebCore/testing/Internals.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -4334,13 +4334,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: branches/safari-605-branch/Source/WebCore/testing/Internals.h (227465 => 227466)


--- branches/safari-605-branch/Source/WebCore/testing/Internals.h	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebCore/testing/Internals.h	2018-01-24 01:09:36 UTC (rev 227466)
@@ -639,8 +639,6 @@
     void pauseTimeline(AnimationTimeline&);
     void setTimelineCurrentTime(AnimationTimeline&, double);
 
-    void testIncomingSyncIPCMessageWhileWaitingForSyncReply();
-
 private:
     explicit Internals(Document&);
     Document* contextDocument() const;

Modified: branches/safari-605-branch/Source/WebCore/testing/Internals.idl (227465 => 227466)


--- branches/safari-605-branch/Source/WebCore/testing/Internals.idl	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebCore/testing/Internals.idl	2018-01-24 01:09:36 UTC (rev 227466)
@@ -572,8 +572,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: branches/safari-605-branch/Source/WebKit/ChangeLog (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/ChangeLog	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog	2018-01-24 01:09:36 UTC (rev 227466)
@@ -1,5 +1,9 @@
 2018-01-23  Jason Marcell  <jmarc...@apple.com>
 
+        Revert r227216. rdar://problem/36722508
+
+2018-01-23  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227429. rdar://problem/36791608
 
     2018-01-23  Joseph Pecoraro  <pecor...@apple.com>

Modified: branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -556,8 +556,7 @@
     bool timedOut = false;
     while (!timedOut) {
         // First, check if we have any messages that we need to process.
-        if (m_shouldProcessIncomingMessagesWhileWaitingForSyncReply || sendSyncOptions.contains(SendSyncOption::ProcessIncomingMessagesEvenWhenWaitingForSyncReply) || sendSyncOptions.contains(SendSyncOption::UseFullySynchronousModeForTesting) || m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting)
-            SyncMessageState::singleton().dispatchMessages(nullptr);
+        SyncMessageState::singleton().dispatchMessages(nullptr);
         
         {
             LockHolder locker(m_syncReplyStateMutex);

Modified: branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.h (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.h	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/Platform/IPC/Connection.h	2018-01-24 01:09:36 UTC (rev 227466)
@@ -64,9 +64,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,
-
-    // This is the default except if setShouldProcessIncomingMessagesWhileWaitingForSyncReply(false) is called on the connection.
-    ProcessIncomingMessagesEvenWhenWaitingForSyncReply = 1 << 2,
 };
 
 enum class WaitForOption {
@@ -154,8 +151,6 @@
     void setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(bool);
     void setShouldExitOnSyncMessageSendFailure(bool);
 
-    void setShouldProcessIncomingMessagesWhileWaitingForSyncReply(bool value) { m_shouldProcessIncomingMessagesWhileWaitingForSyncReply = value; }
-
     // The set callback will be called on the connection work queue when the connection is closed, 
     // before didCall is called on the client thread. Must be called before the connection is opened.
     // In the future we might want a more generic way to handle sync or async messages directly
@@ -275,8 +270,6 @@
     bool m_ignoreTimeoutsForTesting { false };
     bool m_didReceiveInvalidMessage;
 
-    bool m_shouldProcessIncomingMessagesWhileWaitingForSyncReply { true };
-
     // Incoming messages.
     Lock m_incomingMessagesMutex;
     Deque<std::unique_ptr<Decoder>> m_incomingMessages;

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -833,15 +833,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: branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.h (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2018-01-24 01:09:36 UTC (rev 227466)
@@ -223,7 +223,6 @@
     void didDestroyUserGestureToken(uint64_t);
 
     void shouldTerminate(bool& shouldTerminate);
-    void testIncomingSyncIPCMessageWhileWaitingForSyncReply(bool& handled);
 
     void createNewMessagePortChannel(const WebCore::MessagePortIdentifier& port1, const WebCore::MessagePortIdentifier& port2);
     void entangleLocalPortInThisProcessToRemote(const WebCore::MessagePortIdentifier& local, const WebCore::MessagePortIdentifier& remote);

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.messages.in (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.messages.in	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/WebProcessProxy.messages.in	2018-01-24 01:09:36 UTC (rev 227466)
@@ -55,8 +55,6 @@
     MemoryPressureStatusChanged(bool isUnderMemoryPressure)
     DidExceedInactiveMemoryLimitWhileActive()
 
-    TestIncomingSyncIPCMessageWhileWaitingForSyncReply() -> (bool handled)
-
     CreateNewMessagePortChannel(struct WebCore::MessagePortIdentifier port1, struct WebCore::MessagePortIdentifier port2)
     EntangleLocalPortInThisProcessToRemote(struct WebCore::MessagePortIdentifier local, struct WebCore::MessagePortIdentifier remote)
     MessagePortDisentangled(struct WebCore::MessagePortIdentifier local)

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -54,9 +54,6 @@
 NetworkProcessConnection::NetworkProcessConnection(IPC::Connection::Identifier connectionIdentifier)
     : m_connection(IPC::Connection::createClientConnection(connectionIdentifier, *this))
 {
-    // The WebProcess never processes incoming messages while waiting for a synchronous message reply as it would not be safe.
-    m_connection->setShouldProcessIncomingMessagesWhileWaitingForSyncReply(false);
-
     m_connection->open();
 }
 

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/Storage/WebToStorageProcessConnection.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/Storage/WebToStorageProcessConnection.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/Storage/WebToStorageProcessConnection.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -46,9 +46,6 @@
 WebToStorageProcessConnection::WebToStorageProcessConnection(IPC::Connection::Identifier connectionIdentifier)
     : m_connection(IPC::Connection::createClientConnection(connectionIdentifier, *this))
 {
-    // The WebProcess never processes incoming messages while waiting for a synchronous message reply as it would not be safe.
-    m_connection->setShouldProcessIncomingMessagesWhileWaitingForSyncReply(false);
-
     m_connection->open();
 }
 

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/WebConnectionToUIProcess.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebConnectionToUIProcess.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebConnectionToUIProcess.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -42,9 +42,6 @@
     : m_process(process)
 {
     m_process->addMessageReceiver(Messages::WebConnection::messageReceiverName(), *this);
-
-    // The WebProcess never processes incoming messages while waiting for a synchronous message reply as it would not be safe.
-    messageSenderConnection()->setShouldProcessIncomingMessagesWhileWaitingForSyncReply(false);
 }
 
 void WebConnectionToUIProcess::invalidate()

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -712,13 +712,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);
-    RELEASE_ASSERT(wasHandled);
-}
-
 void WebChromeClient::exceededDatabaseQuota(Frame& frame, const String& databaseName, DatabaseDetails details)
 {
     WebFrame* webFrame = WebFrame::fromCoreFrame(frame);

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h	2018-01-24 01:09:36 UTC (rev 227466)
@@ -135,8 +135,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: branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -313,13 +313,13 @@
 void WebEditorClient::undo()
 {
     bool result = false;
-    m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(static_cast<uint32_t>(WebPageProxy::Undo)), Messages::WebPageProxy::ExecuteUndoRedo::Reply(result), Seconds::infinity(), IPC::SendSyncOption::ProcessIncomingMessagesEvenWhenWaitingForSyncReply);
+    m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(static_cast<uint32_t>(WebPageProxy::Undo)), Messages::WebPageProxy::ExecuteUndoRedo::Reply(result));
 }
 
 void WebEditorClient::redo()
 {
     bool result = false;
-    m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(static_cast<uint32_t>(WebPageProxy::Redo)), Messages::WebPageProxy::ExecuteUndoRedo::Reply(result), Seconds::infinity(), IPC::SendSyncOption::ProcessIncomingMessagesEvenWhenWaitingForSyncReply);
+    m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(static_cast<uint32_t>(WebPageProxy::Redo)), Messages::WebPageProxy::ExecuteUndoRedo::Reply(result));
 }
 
 #if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE)

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.cpp (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.cpp	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.cpp	2018-01-24 01:09:36 UTC (rev 227466)
@@ -1050,10 +1050,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);

Modified: branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.h (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.h	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.h	2018-01-24 01:09:36 UTC (rev 227466)
@@ -294,7 +294,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: branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.messages.in (227465 => 227466)


--- branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.messages.in	2018-01-24 01:08:29 UTC (rev 227465)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/WebProcess.messages.in	2018-01-24 01:09:36 UTC (rev 227466)
@@ -103,8 +103,6 @@
     MainThreadPing()
     BackgroundResponsivenessPing()
 
-    SyncIPCMessageWhileWaitingForSyncReplyForTesting() -> ()
-
 #if ENABLE(GAMEPAD)
     SetInitialGamepads(Vector<WebKit::GamepadData> gamepadDatas)
     GamepadConnected(WebKit::GamepadData gamepadData)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to