<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185839] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185839">185839</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-06-22 12:52:51 -0700 (Mon, 22 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove m_clientRunLoop from IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=146212

Reviewed by Sam Weinig.

We only ever create connections whose messages are dispatched to the main run loop, so we can
vastly simplify the code by only allowing messages to be dispatched there.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessDatabaseToWebProcessConnectioncpp">trunk/Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectioncpp">trunk/Source/WebKit2/Platform/IPC/Connection.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCConnectionh">trunk/Source/WebKit2/Platform/IPC/Connection.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformIPCmacConnectionMacmm">trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessWebProcessConnectioncpp">trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedChildProcesscpp">trunk/Source/WebKit2/Shared/ChildProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedChildProcessProxycpp">trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPluginProcessProxycpp">trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesWebToDatabaseProcessConnectioncpp">trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkNetworkProcessConnectioncpp">trunk/Source/WebKit2/WebProcess/Network/NetworkProcessConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginProcessConnectioncpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorcpp">trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorUIcpp">trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/ChangeLog        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -1,5 +1,55 @@
</span><span class="cx"> 2015-06-22  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Remove m_clientRunLoop from IPC::Connection
+        https://bugs.webkit.org/show_bug.cgi?id=146212
+
+        Reviewed by Sam Weinig.
+
+        We only ever create connections whose messages are dispatched to the main run loop, so we can 
+        vastly simplify the code by only allowing messages to be dispatched there.
+
+        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
+        (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
+        * Platform/IPC/Connection.cpp:
+        (IPC::Connection::createServerConnection):
+        (IPC::Connection::createClientConnection):
+        (IPC::Connection::Connection):
+        (IPC::Connection::addWorkQueueMessageReceiver):
+        (IPC::Connection::removeWorkQueueMessageReceiver):
+        (IPC::Connection::waitForMessage):
+        (IPC::Connection::sendSyncMessage):
+        (IPC::Connection::sendSyncMessageFromSecondaryThread):
+        (IPC::Connection::processIncomingMessage):
+        (IPC::Connection::connectionDidClose):
+        (IPC::Connection::dispatchDidReceiveInvalidMessage):
+        (IPC::Connection::enqueueIncomingMessage):
+        (IPC::Connection::wakeUpRunLoop):
+        * Platform/IPC/Connection.h:
+        * Platform/IPC/mac/ConnectionMac.mm:
+        (IPC::Connection::receiveSourceEventHandler):
+        * PluginProcess/WebProcessConnection.cpp:
+        (WebKit::WebProcessConnection::WebProcessConnection):
+        * Shared/ChildProcess.cpp:
+        (WebKit::ChildProcess::initialize):
+        * Shared/ChildProcessProxy.cpp:
+        (WebKit::ChildProcessProxy::didFinishLaunching):
+        * UIProcess/Plugins/PluginProcessProxy.cpp:
+        (WebKit::PluginProcessProxy::didFinishLaunching):
+        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
+        (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
+        * WebProcess/Network/NetworkProcessConnection.cpp:
+        (WebKit::NetworkProcessConnection::NetworkProcessConnection):
+        * WebProcess/Plugins/PluginProcessConnection.cpp:
+        (WebKit::PluginProcessConnection::PluginProcessConnection):
+        * WebProcess/WebPage/WebInspector.cpp:
+        (WebKit::WebInspector::createInspectorPage):
+        * WebProcess/WebPage/WebInspectorUI.cpp:
+        (WebKit::WebInspectorUI::establishConnection):
+
+2015-06-22  Anders Carlsson  &lt;andersca@apple.com&gt;
+
</ins><span class="cx">         Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=146211
</span><span class="cx">         rdar://problem/17180615
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessDatabaseToWebProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> DatabaseToWebProcessConnection::DatabaseToWebProcessConnection(IPC::Connection::Identifier connectionIdentifier)
</span><span class="cx"> {
</span><del>-    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_connection-&gt;setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
</span><span class="cx">     m_connection-&gt;open();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> 
</span><span class="cx"> NetworkConnectionToWebProcess::NetworkConnectionToWebProcess(IPC::Connection::Identifier connectionIdentifier)
</span><span class="cx"> {
</span><del>-    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_connection-&gt;open();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -225,17 +225,17 @@
</span><span class="cx">     dispatchMessages(&amp;connection);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Connection&gt; Connection::createServerConnection(Identifier identifier, Client&amp; client, RunLoop&amp; clientRunLoop)
</del><ins>+Ref&lt;Connection&gt; Connection::createServerConnection(Identifier identifier, Client&amp; client)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new Connection(identifier, true, client, clientRunLoop));
</del><ins>+    return adoptRef(*new Connection(identifier, true, client));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Connection&gt; Connection::createClientConnection(Identifier identifier, Client&amp; client, RunLoop&amp; clientRunLoop)
</del><ins>+Ref&lt;Connection&gt; Connection::createClientConnection(Identifier identifier, Client&amp; client)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new Connection(identifier, false, client, clientRunLoop));
</del><ins>+    return adoptRef(*new Connection(identifier, false, client));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Connection::Connection(Identifier identifier, bool isServer, Client&amp; client, RunLoop&amp; clientRunLoop)
</del><ins>+Connection::Connection(Identifier identifier, bool isServer, Client&amp; client)
</ins><span class="cx">     : m_client(&amp;client)
</span><span class="cx">     , m_isServer(isServer)
</span><span class="cx">     , m_syncRequestID(0)
</span><span class="lines">@@ -244,16 +244,15 @@
</span><span class="cx">     , m_didCloseOnConnectionWorkQueueCallback(0)
</span><span class="cx">     , m_isConnected(false)
</span><span class="cx">     , m_connectionQueue(WorkQueue::create(&quot;com.apple.IPC.ReceiveQueue&quot;))
</span><del>-    , m_clientRunLoop(clientRunLoop)
</del><span class="cx">     , m_inSendSyncCount(0)
</span><span class="cx">     , m_inDispatchMessageCount(0)
</span><span class="cx">     , m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount(0)
</span><span class="cx">     , m_didReceiveInvalidMessage(false)
</span><span class="cx">     , m_waitingForMessage(nullptr)
</span><del>-    , m_syncMessageState(SyncMessageState::getOrCreate(clientRunLoop))
</del><ins>+    , m_syncMessageState(SyncMessageState::getOrCreate(RunLoop::main()))
</ins><span class="cx">     , m_shouldWaitForSyncReplies(true)
</span><span class="cx"> {
</span><del>-    ASSERT(m_client);
</del><ins>+    ASSERT(RunLoop::isMain());
</ins><span class="cx"> 
</span><span class="cx">     platformInitialize(identifier);
</span><span class="cx"> 
</span><span class="lines">@@ -284,7 +283,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::addWorkQueueMessageReceiver(StringReference messageReceiverName, WorkQueue* workQueue, WorkQueueMessageReceiver* workQueueMessageReceiver)
</span><span class="cx"> {
</span><del>-    ASSERT(&amp;RunLoop::current() == &amp;m_clientRunLoop);
</del><ins>+    ASSERT(RunLoop::isMain());
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Connection&gt; connection(this);
</span><span class="cx">     m_connectionQueue-&gt;dispatch([connection, messageReceiverName, workQueue, workQueueMessageReceiver] {
</span><span class="lines">@@ -296,7 +295,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::removeWorkQueueMessageReceiver(StringReference messageReceiverName)
</span><span class="cx"> {
</span><del>-    ASSERT(&amp;RunLoop::current() == &amp;m_clientRunLoop);
</del><ins>+    ASSERT(RunLoop::isMain());
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Connection&gt; connection(this);
</span><span class="cx">     m_connectionQueue-&gt;dispatch([connection, messageReceiverName] {
</span><span class="lines">@@ -416,7 +415,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;MessageDecoder&gt; Connection::waitForMessage(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, std::chrono::milliseconds timeout, unsigned waitForMessageFlags)
</span><span class="cx"> {
</span><del>-    ASSERT(&amp;m_clientRunLoop == &amp;RunLoop::current());
</del><ins>+    ASSERT(RunLoop::isMain());
</ins><span class="cx"> 
</span><span class="cx">     bool hasIncomingSynchronousMessage = false;
</span><span class="cx"> 
</span><span class="lines">@@ -480,7 +479,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;MessageDecoder&gt; Connection::sendSyncMessage(uint64_t syncRequestID, std::unique_ptr&lt;MessageEncoder&gt; encoder, std::chrono::milliseconds timeout, unsigned syncSendFlags)
</span><span class="cx"> {
</span><del>-    if (&amp;RunLoop::current() != &amp;m_clientRunLoop) {
</del><ins>+    if (!RunLoop::isMain()) {
</ins><span class="cx">         // No flags are supported for synchronous messages sent from secondary threads.
</span><span class="cx">         ASSERT(!syncSendFlags);
</span><span class="cx">         return sendSyncMessageFromSecondaryThread(syncRequestID, WTF::move(encoder), timeout);
</span><span class="lines">@@ -533,7 +532,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;MessageDecoder&gt; Connection::sendSyncMessageFromSecondaryThread(uint64_t syncRequestID, std::unique_ptr&lt;MessageEncoder&gt; encoder, std::chrono::milliseconds timeout)
</span><span class="cx"> {
</span><del>-    ASSERT(&amp;RunLoop::current() != &amp;m_clientRunLoop);
</del><ins>+    ASSERT(!RunLoop::isMain());
</ins><span class="cx"> 
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -678,7 +677,7 @@
</span><span class="cx">         StringReference messageName = message-&gt;messageName();
</span><span class="cx">         StringCapture capturedMessageName(messageName.isEmpty() ? &quot;&lt;unknown message&gt;&quot; : String(messageName.data(), messageName.size()));
</span><span class="cx"> 
</span><del>-        m_clientRunLoop.dispatch([protectedThis, capturedMessageReceiverName, capturedMessageName] {
</del><ins>+        RunLoop::main().dispatch([protectedThis, capturedMessageReceiverName, capturedMessageName] {
</ins><span class="cx">             protectedThis-&gt;dispatchDidReceiveInvalidMessage(capturedMessageReceiverName.string().utf8(), capturedMessageName.string().utf8());
</span><span class="cx">         });
</span><span class="cx">         return;
</span><span class="lines">@@ -766,7 +765,7 @@
</span><span class="cx">         m_didCloseOnConnectionWorkQueueCallback(this);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Connection&gt; connection(this);
</span><del>-    m_clientRunLoop.dispatch([connection] {
</del><ins>+    RunLoop::main().dispatch([connection] {
</ins><span class="cx">         // If the connection has been explicitly invalidated before dispatchConnectionDidClose was called,
</span><span class="cx">         // then the client will be null here.
</span><span class="cx">         if (!connection-&gt;m_client)
</span><span class="lines">@@ -836,7 +835,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::dispatchDidReceiveInvalidMessage(const CString&amp; messageReceiverNameString, const CString&amp; messageNameString)
</span><span class="cx"> {
</span><del>-    ASSERT(&amp;RunLoop::current() == &amp;m_clientRunLoop);
</del><ins>+    ASSERT(RunLoop::isMain());
</ins><span class="cx"> 
</span><span class="cx">     if (!m_client)
</span><span class="cx">         return;
</span><span class="lines">@@ -860,7 +859,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Connection&gt; protectedThis(this);
</span><del>-    m_clientRunLoop.dispatch([protectedThis] {
</del><ins>+    RunLoop::main().dispatch([protectedThis] {
</ins><span class="cx">         protectedThis-&gt;dispatchOneMessage();
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -923,7 +922,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Connection::wakeUpRunLoop()
</span><span class="cx"> {
</span><del>-    m_clientRunLoop.wakeUp();
</del><ins>+    RunLoop::main().wakeUp();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/Connection.h (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/Connection.h        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/Platform/IPC/Connection.h        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -51,10 +51,6 @@
</span><span class="cx"> #include &quot;PlatformProcessIdentifier.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-namespace WTF {
-class RunLoop;
-}
-
</del><span class="cx"> namespace IPC {
</span><span class="cx"> 
</span><span class="cx"> struct WaitForMessageState;
</span><span class="lines">@@ -144,8 +140,8 @@
</span><span class="cx">     static Connection::SocketPair createPlatformConnection(unsigned options = SetCloexecOnClient | SetCloexecOnServer);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    static Ref&lt;Connection&gt; createServerConnection(Identifier, Client&amp;, WTF::RunLoop&amp; clientRunLoop);
-    static Ref&lt;Connection&gt; createClientConnection(Identifier, Client&amp;, WTF::RunLoop&amp; clientRunLoop);
</del><ins>+    static Ref&lt;Connection&gt; createServerConnection(Identifier, Client&amp;);
+    static Ref&lt;Connection&gt; createClientConnection(Identifier, Client&amp;);
</ins><span class="cx">     ~Connection();
</span><span class="cx"> 
</span><span class="cx">     Client* client() const { return m_client; }
</span><span class="lines">@@ -205,7 +201,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    Connection(Identifier, bool isServer, Client&amp;, WTF::RunLoop&amp; clientRunLoop);
</del><ins>+    Connection(Identifier, bool isServer, Client&amp;);
</ins><span class="cx">     void platformInitialize(Identifier);
</span><span class="cx">     void platformInvalidate();
</span><span class="cx">     
</span><span class="lines">@@ -249,7 +245,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_isConnected;
</span><span class="cx">     Ref&lt;WorkQueue&gt; m_connectionQueue;
</span><del>-    WTF::RunLoop&amp; m_clientRunLoop;
</del><span class="cx"> 
</span><span class="cx">     HashMap&lt;StringReference, std::pair&lt;RefPtr&lt;WorkQueue&gt;, RefPtr&lt;WorkQueueMessageReceiver&gt;&gt;&gt; m_workQueueMessageReceivers;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformIPCmacConnectionMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -514,7 +514,7 @@
</span><span class="cx">             StringCapture capturedMessageReceiverName(String(messageReceiverName.data(), messageReceiverName.size()));
</span><span class="cx">             StringReference messageName = decoder-&gt;messageName();
</span><span class="cx">             StringCapture capturedMessageName(String(messageName.data(), messageName.size()));
</span><del>-            m_clientRunLoop.dispatch([protectedThis, capturedMessageReceiverName, capturedMessageName] {
</del><ins>+            RunLoop::main().dispatch([protectedThis, capturedMessageReceiverName, capturedMessageName] {
</ins><span class="cx">                 protectedThis-&gt;dispatchDidReceiveInvalidMessage(capturedMessageReceiverName.string().utf8(), capturedMessageName.string().utf8());
</span><span class="cx">             });
</span><span class="cx">             return;
</span></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessWebProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     
</span><span class="cx"> WebProcessConnection::WebProcessConnection(IPC::Connection::Identifier connectionIdentifier)
</span><span class="cx"> {
</span><del>-    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_npRemoteObjectMap = NPRemoteObjectMap::create(m_connection.get());
</span><span class="cx"> 
</span><span class="cx">     m_connection-&gt;setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedChildProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ChildProcess.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ChildProcess.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/Shared/ChildProcess.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     SandboxInitializationParameters sandboxParameters;
</span><span class="cx">     initializeSandbox(parameters, sandboxParameters);
</span><span class="cx">     
</span><del>-    m_connection = IPC::Connection::createClientConnection(parameters.connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createClientConnection(parameters.connectionIdentifier, *this);
</ins><span class="cx">     m_connection-&gt;setDidCloseOnConnectionWorkQueueCallback(didCloseOnConnectionWorkQueue);
</span><span class="cx">     initializeConnection(m_connection.get());
</span><span class="cx">     m_connection-&gt;open();
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedChildProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_connection);
</span><span class="cx"> 
</span><del>-    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
</ins><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt;= 101000
</span><span class="cx">     m_connection-&gt;setShouldCloseConnectionOnMachExceptions();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPluginProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
</ins><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt;= 101000
</span><span class="cx">     m_connection-&gt;setShouldCloseConnectionOnMachExceptions();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesWebToDatabaseProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebToDatabaseProcessConnection::WebToDatabaseProcessConnection(IPC::Connection::Identifier connectionIdentifier)
</span><span class="cx"> {
</span><del>-    m_connection = IPC::Connection::createClientConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createClientConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_connection-&gt;open();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkNetworkProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/NetworkProcessConnection.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/NetworkProcessConnection.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/WebProcess/Network/NetworkProcessConnection.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> NetworkProcessConnection::NetworkProcessConnection(IPC::Connection::Identifier connectionIdentifier)
</span><span class="cx"> {
</span><del>-    m_connection = IPC::Connection::createClientConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createClientConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_connection-&gt;open();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">     , m_supportsAsynchronousPluginInitialization(supportsAsynchronousPluginInitialization)
</span><span class="cx">     , m_audioHardwareActivity(WebCore::AudioHardwareActivityType::Unknown)
</span><span class="cx"> {
</span><del>-    m_connection = IPC::Connection::createClientConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_connection = IPC::Connection::createClientConnection(connectionIdentifier, *this);
</ins><span class="cx"> 
</span><span class="cx">     m_npRemoteObjectMap = NPRemoteObjectMap::create(m_connection.get());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">     return;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    m_frontendConnection = IPC::Connection::createServerConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_frontendConnection = IPC::Connection::createServerConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_frontendConnection-&gt;open();
</span><span class="cx"> 
</span><span class="cx">     WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::WebInspectorProxy::CreateInspectorPage(connectionClientPort, canAttachWindow(), underTest), m_page-&gt;pageID());
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorUIcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp (185838 => 185839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp        2015-06-22 19:35:19 UTC (rev 185838)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp        2015-06-22 19:52:51 UTC (rev 185839)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_page-&gt;corePage()-&gt;inspectorController().setInspectorFrontendClient(this);
</span><span class="cx"> 
</span><del>-    m_backendConnection = IPC::Connection::createClientConnection(connectionIdentifier, *this, RunLoop::main());
</del><ins>+    m_backendConnection = IPC::Connection::createClientConnection(connectionIdentifier, *this);
</ins><span class="cx">     m_backendConnection-&gt;open();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>