<!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>[164832] 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/164832">164832</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-02-27 15:16:41 -0800 (Thu, 27 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Simplify WebProcessProxy state accessors
https://bugs.webkit.org/show_bug.cgi?id=129453

Reviewed by Andreas Kling.

Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.

* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::state):
(WebKit::ChildProcessProxy::sendMessage):
(WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::canSendMessage):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getPluginProcessConnection):
(WebKit::PluginProcessProxy::getSitesWithData):
(WebKit::PluginProcessProxy::clearSiteData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):
(WebKit::WebProcessProxy::enableSuddenTermination):
(WebKit::WebProcessProxy::disableSuddenTermination):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::updateProcessSuppressionState):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedChildProcessProxycpp">trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedChildProcessProxyh">trunk/Source/WebKit2/Shared/ChildProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxycpp">trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkmacNetworkProcessProxyMacmm">trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPluginProcessProxycpp">trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebProcessProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2014-02-27  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Simplify WebProcessProxy state accessors
+        https://bugs.webkit.org/show_bug.cgi?id=129453
+
+        Reviewed by Andreas Kling.
+
+        Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
+        WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.
+
+        * Shared/ChildProcessProxy.cpp:
+        (WebKit::ChildProcessProxy::state):
+        (WebKit::ChildProcessProxy::sendMessage):
+        (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
+        * Shared/ChildProcessProxy.h:
+        (WebKit::ChildProcessProxy::canSendMessage):
+        * UIProcess/Databases/DatabaseProcessProxy.cpp:
+        (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
+        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
+        (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
+        * UIProcess/Plugins/PluginProcessProxy.cpp:
+        (WebKit::PluginProcessProxy::getPluginProcessConnection):
+        (WebKit::PluginProcessProxy::getSitesWithData):
+        (WebKit::PluginProcessProxy::clearSiteData):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::reattachToWebProcess):
+        (WebKit::WebPageProxy::waitForDidUpdateViewState):
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::requestTermination):
+        (WebKit::WebProcessProxy::enableSuddenTermination):
+        (WebKit::WebProcessProxy::disableSuddenTermination):
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
+        * UIProcess/mac/WebProcessProxyMac.mm:
+        (WebKit::WebProcessProxy::updateProcessSuppressionState):
+
</ins><span class="cx"> 2014-02-27  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash tapping on play button on video on iOS
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedChildProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.cpp        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -69,19 +69,33 @@
</span><span class="cx">         m_processLauncher-&gt;terminateProcess();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ChildProcessProxy::State ChildProcessProxy::state() const
+{
+    if (m_processLauncher &amp;&amp; m_processLauncher-&gt;isLaunching())
+        return ChildProcessProxy::State::Launching;
+
+    if (!m_connection)
+        return ChildProcessProxy::State::Terminated;
+
+    return ChildProcessProxy::State::Running;
+}
+
</ins><span class="cx"> bool ChildProcessProxy::sendMessage(std::unique_ptr&lt;IPC::MessageEncoder&gt; encoder, unsigned messageSendFlags)
</span><span class="cx"> {
</span><del>-    // If we're waiting for the child process to launch, we need to stash away the messages so we can send them once we have a connection.
-    if (isLaunching()) {
</del><ins>+    switch (state()) {
+    case State::Launching:
+        // If we're waiting for the child process to launch, we need to stash away the messages so we can send them once we have a connection.
</ins><span class="cx">         m_pendingMessages.append(std::make_pair(std::move(encoder), messageSendFlags));
</span><span class="cx">         return true;
</span><del>-    }
</del><span class="cx"> 
</span><del>-    // If the web process has exited, connection will be null here.
-    if (!m_connection)
</del><ins>+    case State::Running:
+        return connection()-&gt;sendMessage(std::move(encoder), messageSendFlags);
+
+    case State::Terminated:
</ins><span class="cx">         return false;
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    return connection()-&gt;sendMessage(std::move(encoder), messageSendFlags);
</del><ins>+    return false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&amp; messageReceiver)
</span><span class="lines">@@ -109,14 +123,6 @@
</span><span class="cx">     return m_messageReceiverMap.dispatchSyncMessage(connection, decoder, replyEncoder);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ChildProcessProxy::isLaunching() const
-{
-    if (m_processLauncher)
-        return m_processLauncher-&gt;isLaunching();
-
-    return false;
-}
-
</del><span class="cx"> void ChildProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_connection);
</span><span class="lines">@@ -140,11 +146,11 @@
</span><span class="cx"> 
</span><span class="cx"> void ChildProcessProxy::abortProcessLaunchIfNeeded()
</span><span class="cx"> {
</span><del>-    if (!isLaunching())
</del><ins>+    if (state() != State::Launching)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_processLauncher-&gt;invalidate();
</span><del>-    m_processLauncher = 0;
</del><ins>+    m_processLauncher = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ChildProcessProxy::clearConnection()
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedChildProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ChildProcessProxy.h (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ChildProcessProxy.h        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/Shared/ChildProcessProxy.h        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -60,10 +60,16 @@
</span><span class="cx">     void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&amp;);
</span><span class="cx">     void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID);
</span><span class="cx"> 
</span><del>-    bool isValid() const { return m_connection; }
-    bool isLaunching() const;
-    bool canSendMessage() const { return isValid() || isLaunching(); }
</del><ins>+    enum class State {
+        Launching,
+        Running,
+        Terminated,
+    };
+    State state() const;
</ins><span class="cx"> 
</span><ins>+//    bool isValid() const { return m_connection; }
+    bool canSendMessage() const { return state() != State::Terminated;}
+
</ins><span class="cx">     PlatformProcessIdentifier processIdentifier() const { return m_processLauncher-&gt;processIdentifier(); }
</span><span class="cx"> 
</span><span class="cx">     bool sendMessage(std::unique_ptr&lt;IPC::MessageEncoder&gt;, unsigned messageSendFlags);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_pendingConnectionReplies.append(reply);
</span><span class="cx"> 
</span><del>-    if (isLaunching()) {
</del><ins>+    if (state() == State::Launching) {
</ins><span class="cx">         m_numPendingConnectionRequests++;
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_pendingConnectionReplies.append(reply);
</span><span class="cx"> 
</span><del>-    if (isLaunching()) {
</del><ins>+    if (state() == State::Launching) {
</ins><span class="cx">         m_numPendingConnectionRequests++;
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkmacNetworkProcessProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEnabled)
</span><span class="cx"> {
</span><del>-    if (!isValid())
</del><ins>+    if (state() != State::Running)
</ins><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     connection()-&gt;send(Messages::NetworkProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPluginProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_pendingConnectionReplies.append(reply);
</span><span class="cx"> 
</span><del>-    if (isLaunching()) {
</del><ins>+    if (state() == State::Launching) {
</ins><span class="cx">         m_numPendingConnectionRequests++;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">     ASSERT(!m_pendingGetSitesReplies.contains(callbackID));
</span><span class="cx">     m_pendingGetSitesReplies.set(callbackID, webPluginSiteDataManager);
</span><span class="cx"> 
</span><del>-    if (isLaunching()) {
</del><ins>+    if (state() == State::Launching) {
</ins><span class="cx">         m_pendingGetSitesRequests.append(callbackID);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">     ASSERT(!m_pendingClearSiteDataReplies.contains(callbackID));
</span><span class="cx">     m_pendingClearSiteDataReplies.set(callbackID, webPluginSiteDataManager);
</span><span class="cx"> 
</span><del>-    if (isLaunching()) {
</del><ins>+    if (state() == State::Launching) {
</ins><span class="cx">         ClearSiteDataRequest request;
</span><span class="cx">         request.sites = sites;
</span><span class="cx">         request.flags = flags;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -371,7 +371,8 @@
</span><span class="cx">     m_process-&gt;addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, *this);
</span><span class="cx"> 
</span><span class="cx">     // FIXME: If we ever expose the session storage size as a preference, we need to pass it here.
</span><del>-    m_process-&gt;context().storageManager().createSessionStorageNamespace(m_pageID, m_process-&gt;isValid() ? m_process-&gt;connection() : 0, std::numeric_limits&lt;unsigned&gt;::max());
</del><ins>+    IPC::Connection* connection = m_process-&gt;state() == WebProcessProxy::State::Running ? m_process-&gt;connection() : nullptr;
+    m_process-&gt;context().storageManager().createSessionStorageNamespace(m_pageID, connection, std::numeric_limits&lt;unsigned&gt;::max());
</ins><span class="cx">     setSession(*configuration.session);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -483,8 +484,7 @@
</span><span class="cx"> void WebPageProxy::reattachToWebProcess()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isValid());
</span><del>-    ASSERT(!m_process-&gt;isValid());
-    ASSERT(!m_process-&gt;isLaunching());
</del><ins>+    ASSERT(m_process-&gt;state() == WebProcessProxy::State::Terminated);
</ins><span class="cx"> 
</span><span class="cx">     updateViewState();
</span><span class="cx"> 
</span><span class="lines">@@ -1031,7 +1031,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_waitingForDidUpdateViewState = true;
</span><span class="cx"> 
</span><del>-    if (!m_process-&gt;isLaunching()) {
</del><ins>+    if (m_process-&gt;state() != WebProcessProxy::State::Launching) {
</ins><span class="cx">         auto viewStateUpdateTimeout = std::chrono::milliseconds(250);
</span><span class="cx">         m_process-&gt;connection()-&gt;waitForAndDispatchImmediately&lt;Messages::WebPageProxy::DidUpdateViewState&gt;(m_pageID, viewStateUpdateTimeout);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -646,7 +646,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebProcessProxy::requestTermination()
</span><span class="cx"> {
</span><del>-    if (!isValid())
</del><ins>+    if (state() != State::Running)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ChildProcessProxy::terminate();
</span><span class="lines">@@ -659,7 +659,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebProcessProxy::enableSuddenTermination()
</span><span class="cx"> {
</span><del>-    if (!isValid())
</del><ins>+    if (state() != State::Running)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_numberOfTimesSuddenTerminationWasDisabled);
</span><span class="lines">@@ -669,7 +669,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebProcessProxy::disableSuddenTermination()
</span><span class="cx"> {
</span><del>-    if (!isValid())
</del><ins>+    if (state() != State::Running)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     WebCore::disableSuddenTermination();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     if (!m_isWaitingForDidUpdateGeometry)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (m_webPageProxy-&gt;process().isLaunching())
</del><ins>+    if (m_webPageProxy-&gt;process().state() != WebProcessProxy::State::Running)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_webPageProxy-&gt;process().connection()-&gt;waitForAndDispatchImmediately&lt;Messages::DrawingAreaProxy::DidUpdateGeometry&gt;(m_webPageProxy-&gt;pageID(), timeout);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -437,7 +437,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebPageProxy::shouldDelayWindowOrderingForEvent(const WebKit::WebMouseEvent&amp; event)
</span><span class="cx"> {
</span><del>-    if (!process().isValid())
</del><ins>+    if (process().state() != WebProcessProxy::State::Running)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     bool result = false;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebProcessProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm (164831 => 164832)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm        2014-02-27 22:55:44 UTC (rev 164831)
+++ trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm        2014-02-27 23:16:41 UTC (rev 164832)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebProcessProxy::updateProcessSuppressionState()
</span><span class="cx"> {
</span><del>-    if (!isValid())
</del><ins>+    if (state() != State::Running)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     bool canEnable = allPagesAreProcessSuppressible();
</span></span></pre>
</div>
</div>

</body>
</html>