<!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>[184730] branches/safari-601.1.32.2-branch/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/184730">184730</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-05-21 12:52:44 -0700 (Thu, 21 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/184503">r184503</a>.  rdar://problem/20368630</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6011322branchSourceWebKit2CMakeListstxt">branches/safari-601.1.32.2-branch/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2ChangeLog">branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2DerivedSourcesmake">branches/safari-601.1.32.2-branch/Source/WebKit2/DerivedSources.make</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2NetworkProcessNetworkProcesscpp">branches/safari-601.1.32.2-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2SharedChildProcesscpp">branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.cpp</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2SharedChildProcessh">branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.h</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2SharedChildProcessProxycpp">branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.cpp</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2SharedChildProcessProxyh">branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.h</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2UIProcessWebProcessPoolcpp">branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2UIProcessWebProcessProxycpp">branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2WebKit2xcodeprojprojectpbxproj">branches/safari-601.1.32.2-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari6011322branchSourceWebKit2WebProcessWebProcesscpp">branches/safari-601.1.32.2-branch/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6011322branchSourceWebKit2SharedChildProcessmessagesin">branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6011322branchSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/CMakeLists.txt (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/CMakeLists.txt        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/CMakeLists.txt        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -641,6 +641,7 @@
</span><span class="cx">     PluginProcess/PluginProcess.messages.in
</span><span class="cx">     PluginProcess/WebProcessConnection.messages.in
</span><span class="cx"> 
</span><ins>+    Shared/ChildProcess.messages.in
</ins><span class="cx">     Shared/WebConnection.messages.in
</span><span class="cx"> 
</span><span class="cx">     Shared/Authentication/AuthenticationManager.messages.in
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -1,5 +1,58 @@
</span><span class="cx"> 2015-05-21  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r184503.
+
+    2015-05-18  Brady Eidson  &lt;beidson@apple.com&gt;
+
+            Networking process on iOS can be suspended and never exit.
+            &lt;rdar://problem/20368630&gt; and https://bugs.webkit.org/show_bug.cgi?id=144971
+
+            Reviewed by Darin Adler.
+
+            There's a few issues here.
+
+            1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
+                the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
+                We already solved this with WebProcess with a watchdog timer keeping both the process assertion
+                and xpc_connection alive while the process shuts down. This patch expands that to the network
+                process, and it will be easy to expand that to database and plugin processes doing forward.
+
+            2 - All of our child processes either decide to self-terminate or listen for their connection to
+                close at which point they terminate. This leads to various races. We should
+                move to a model where the UI process explicitly tells them to shutdown, and this patch starts us 
+                down that path.
+
+            * CMakeLists.txt:
+            * DerivedSources.make:
+            * WebKit2.xcodeproj/project.pbxproj:
+
+            * NetworkProcess/NetworkProcess.cpp:
+            (WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
+
+            * Shared/ChildProcess.cpp:
+            (WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
+              process do cleanup work before it is terminated.
+            * Shared/ChildProcess.h:
+            * Shared/ChildProcess.messages.in: Added.
+
+            * Shared/ChildProcessProxy.cpp:
+            (WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message 
+              the process to ShutDown.
+            (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
+            * Shared/ChildProcessProxy.h:
+
+            * UIProcess/WebProcessPool.cpp:
+            (WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
+
+            * UIProcess/WebProcessProxy.cpp:
+            (WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
+              code to ChildProcessProxy::shutDownProcess.
+
+            * WebProcess/WebProcess.cpp:
+            (WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.
+
+2015-05-21  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r184370.
</span><span class="cx"> 
</span><span class="cx">     2015-05-14  Brady Eidson  &lt;beidson@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2DerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/DerivedSources.make (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/DerivedSources.make        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/DerivedSources.make        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> 
</span><span class="cx"> MESSAGE_RECEIVERS = \
</span><span class="cx">     AuthenticationManager \
</span><ins>+    ChildProcess \
</ins><span class="cx">     CustomProtocolManager \
</span><span class="cx">     CustomProtocolManagerProxy \
</span><span class="cx">     DatabaseProcess \
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;ArgumentCoders.h&quot;
</span><span class="cx"> #include &quot;Attachment.h&quot;
</span><span class="cx"> #include &quot;AuthenticationManager.h&quot;
</span><ins>+#include &quot;ChildProcessMessages.h&quot;
</ins><span class="cx"> #include &quot;CustomProtocolManager.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;NetworkConnectionToWebProcess.h&quot;
</span><span class="lines">@@ -127,6 +128,11 @@
</span><span class="cx">     if (messageReceiverMap().dispatchMessage(connection, decoder))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    if (decoder.messageReceiverName() == Messages::ChildProcess::messageReceiverName()) {
+        ChildProcess::didReceiveMessage(connection, decoder);
+        return;
+    }
+
</ins><span class="cx">     didReceiveNetworkProcessMessage(connection, decoder);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2SharedChildProcesscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.cpp (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.cpp        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.cpp        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -160,6 +160,11 @@
</span><span class="cx">     stopRunLoop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ChildProcess::shutDown()
+{
+    terminate();
+}
+
</ins><span class="cx"> #if !PLATFORM(COCOA)
</span><span class="cx"> void ChildProcess::platformInitialize()
</span><span class="cx"> {
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2SharedChildProcessh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.h (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.h        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.h        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -93,11 +93,15 @@
</span><span class="cx">     static void stopNSAppRunLoop();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    virtual void didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;) override;
+
</ins><span class="cx"> private:
</span><span class="cx">     // IPC::MessageSender
</span><span class="cx">     virtual IPC::Connection* messageSenderConnection() override;
</span><span class="cx">     virtual uint64_t messageSenderDestinationID() override;
</span><span class="cx"> 
</span><ins>+    void shutDown();
+
</ins><span class="cx">     void terminationTimerFired();
</span><span class="cx"> 
</span><span class="cx">     void platformInitialize();
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2SharedChildProcessmessagesinfromrev184503trunkSourceWebKit2SharedChildProcessmessagesin"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.messages.in (from rev 184503, trunk/Source/WebKit2/Shared/ChildProcess.messages.in) (0 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.messages.in                                (rev 0)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcess.messages.in        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+# Copyright (C) 2015 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -&gt; ChildProcess {
+    ShutDown()
+}
</ins></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2SharedChildProcessProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.cpp (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.cpp        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.cpp        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;ChildProcessProxy.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;ChildProcessMessages.h&quot;
</ins><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -150,22 +151,30 @@
</span><span class="cx">     m_pendingMessages.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ChildProcessProxy::abortProcessLaunchIfNeeded()
-{
-    if (state() != State::Launching)
-        return;
-
-    m_processLauncher-&gt;invalidate();
-    m_processLauncher = nullptr;
-}
-
</del><span class="cx"> void ChildProcessProxy::shutDownProcess()
</span><span class="cx"> {
</span><del>-    if (!m_connection)
</del><ins>+    switch (state()) {
+    case State::Launching:
+        m_processLauncher-&gt;invalidate();
+        m_processLauncher = nullptr;
+        break;
+    case State::Running:
+#if PLATFORM(IOS)
+        // On iOS deploy a watchdog in the UI process, since the child process may be suspended.
+        // If 30s is insufficient for any outstanding activity to complete cleanly, then it will be killed.
+        ASSERT(m_connection);
+        m_connection-&gt;terminateSoon(30);
+#endif
+        break;
+    case State::Terminated:
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     processWillShutDown(*m_connection);
</span><span class="cx"> 
</span><ins>+    if (canSendMessage())
+        send(Messages::ChildProcess::ShutDown(), 0);
+
</ins><span class="cx">     m_connection-&gt;invalidate();
</span><span class="cx">     m_connection = nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2SharedChildProcessProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.h (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.h        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/Shared/ChildProcessProxy.h        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -72,10 +72,9 @@
</span><span class="cx">     bool canSendMessage() const { return state() != State::Terminated;}
</span><span class="cx">     bool sendMessage(std::unique_ptr&lt;IPC::MessageEncoder&gt;, unsigned messageSendFlags);
</span><span class="cx"> 
</span><del>-protected:
</del><span class="cx">     void shutDownProcess();
</span><del>-    void abortProcessLaunchIfNeeded();
</del><span class="cx"> 
</span><ins>+protected:
</ins><span class="cx">     // ProcessLauncher::Client
</span><span class="cx">     virtual void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessPool.cpp (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessPool.cpp        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessPool.cpp        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -272,6 +272,11 @@
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     processPoolCounter.decrement();
</span><span class="cx"> #endif
</span><ins>+
+#if ENABLE(NETWORK_PROCESS)
+    if (m_networkProcess)
+        m_networkProcess-&gt;shutDownProcess();
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::initializeClient(const WKContextClientBase* client)
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -245,16 +245,6 @@
</span><span class="cx">     if (!m_processPool-&gt;usesNetworkProcess() || state() == State::Terminated || !canTerminateChildProcess())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    abortProcessLaunchIfNeeded();
-
-#if PLATFORM(IOS)
-    if (state() == State::Running) {
-        // On iOS deploy a watchdog in the UI process, since the child process may be suspended.
-        // If 30s is insufficient for any outstanding activity to complete cleanly, then it will be killed.
-        connection()-&gt;terminateSoon(30);
-    }
-#endif
-
</del><span class="cx">     shutDown();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -1055,6 +1055,8 @@
</span><span class="cx">                 51FA1E23180CCADE00C44BE9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3DE46815A91763008D26FC /* Foundation.framework */; };
</span><span class="cx">                 51FA2D7415212DF100C1BA0B /* InjectedBundleDOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FA2D5C15211A5000C1BA0B /* InjectedBundleDOMWindowExtension.cpp */; };
</span><span class="cx">                 51FA2D7715212E2600C1BA0B /* WKBundleDOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FA2D7515212E1E00C1BA0B /* WKBundleDOMWindowExtension.cpp */; };
</span><ins>+                51FAEC3A1B0657630009C4E7 /* ChildProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FAEC371B0657310009C4E7 /* ChildProcessMessages.h */; };
+                51FAEC3B1B0657680009C4E7 /* ChildProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FAEC361B0657310009C4E7 /* ChildProcessMessageReceiver.cpp */; };
</ins><span class="cx">                 51FB08FF1639DE1A00EC324A /* WebResourceLoadScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51ABF65616392F1500132A7A /* WebResourceLoadScheduler.cpp */; };
</span><span class="cx">                 51FD18B51651FBAD00DBE1CE /* NetworkResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FD18B31651FBAD00DBE1CE /* NetworkResourceLoader.cpp */; };
</span><span class="cx">                 51FD18B61651FBAD00DBE1CE /* NetworkResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */; };
</span><span class="lines">@@ -3144,6 +3146,7 @@
</span><span class="cx">                 516319911628980A00E22F00 /* NetworkProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessProxyMac.mm; path = mac/NetworkProcessProxyMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5163EA3F1ACC74820012D1E4 /* NativeContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeContextMenuItem.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5163EA431ACC74AE0012D1E4 /* NativeContextMenuItem.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeContextMenuItem.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5164C0941B05B757004F102A /* ChildProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChildProcess.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 51654EFB184EF33F007DC837 /* UniqueIDBDatabaseBackingStoreSQLite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueIDBDatabaseBackingStoreSQLite.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51654EFC184EF33F007DC837 /* UniqueIDBDatabaseBackingStoreSQLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueIDBDatabaseBackingStoreSQLite.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51654EFF184EF34A007DC837 /* UniqueIDBDatabaseBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueIDBDatabaseBackingStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3262,6 +3265,8 @@
</span><span class="cx">                 51FA2D5A15211A1E00C1BA0B /* InjectedBundleDOMWindowExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleDOMWindowExtension.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51FA2D5C15211A5000C1BA0B /* InjectedBundleDOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleDOMWindowExtension.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51FA2D7515212E1E00C1BA0B /* WKBundleDOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleDOMWindowExtension.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                51FAEC361B0657310009C4E7 /* ChildProcessMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildProcessMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                51FAEC371B0657310009C4E7 /* ChildProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildProcessMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 51FB0902163A3B1C00EC324A /* NetworkProcessConnection.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; name = NetworkProcessConnection.messages.in; path = Network/NetworkProcessConnection.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51FD18B31651FBAD00DBE1CE /* NetworkResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkResourceLoader.cpp; path = NetworkProcess/NetworkResourceLoader.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkResourceLoader.h; path = NetworkProcess/NetworkResourceLoader.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4729,6 +4734,7 @@
</span><span class="cx">                                 BC3065F91259344E00E71278 /* CacheModel.h */,
</span><span class="cx">                                 1A2D956E12848564001EB962 /* ChildProcess.cpp */,
</span><span class="cx">                                 1A2D956D12848564001EB962 /* ChildProcess.h */,
</span><ins>+                                5164C0941B05B757004F102A /* ChildProcess.messages.in */,
</ins><span class="cx">                                 E1513C64166EABB200149FCB /* ChildProcessProxy.cpp */,
</span><span class="cx">                                 E1513C65166EABB200149FCB /* ChildProcessProxy.h */,
</span><span class="cx">                                 290F4271172A0C7400939FF0 /* ChildProcessSupplement.h */,
</span><span class="lines">@@ -7227,6 +7233,8 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 512F58A012A883AD00629530 /* AuthenticationManagerMessageReceiver.cpp */,
</span><span class="cx">                                 512F58A112A883AD00629530 /* AuthenticationManagerMessages.h */,
</span><ins>+                                51FAEC361B0657310009C4E7 /* ChildProcessMessageReceiver.cpp */,
+                                51FAEC371B0657310009C4E7 /* ChildProcessMessages.h */,
</ins><span class="cx">                                 E115C715190F8A2500ECC516 /* com.apple.WebKit.Databases.sb */,
</span><span class="cx">                                 E17AE2C216B9C63A001C42F1 /* com.apple.WebKit.NetworkProcess.sb */,
</span><span class="cx">                                 E1967E37150AB5E200C73169 /* com.apple.WebProcess.sb */,
</span><span class="lines">@@ -8229,6 +8237,7 @@
</span><span class="cx">                                 1AB474DE184D44590051B622 /* WKBundlePageUIClient.h in Headers */,
</span><span class="cx">                                 BCF049E711FE20F600F86A58 /* WKBundlePrivate.h in Headers */,
</span><span class="cx">                                 BC60C5791240A546008C5E29 /* WKBundleRangeHandle.h in Headers */,
</span><ins>+                                51FAEC3A1B0657630009C4E7 /* ChildProcessMessages.h in Headers */,
</ins><span class="cx">                                 BC5D24C716CD73C5007D5461 /* WKBundleRangeHandlePrivate.h in Headers */,
</span><span class="cx">                                 BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */,
</span><span class="cx">                                 BC4075F6124FF0270068F20A /* WKCertificateInfo.h in Headers */,
</span><span class="lines">@@ -9575,6 +9584,7 @@
</span><span class="cx">                                 1A6FBA2B11E6862700DB1371 /* NetscapeBrowserFuncs.cpp in Sources */,
</span><span class="cx">                                 1A6FBD2911E69BC200DB1371 /* NetscapePlugin.cpp in Sources */,
</span><span class="cx">                                 1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */,
</span><ins>+                                51FAEC3B1B0657680009C4E7 /* ChildProcessMessageReceiver.cpp in Sources */,
</ins><span class="cx">                                 1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
</span><span class="cx">                                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,
</span><span class="cx">                                 1AA5889311EE70400061B882 /* NetscapePluginStream.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari6011322branchSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/WebProcess/WebProcess.cpp (184729 => 184730)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.32.2-branch/Source/WebKit2/WebProcess/WebProcess.cpp        2015-05-21 19:51:39 UTC (rev 184729)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/WebProcess/WebProcess.cpp        2015-05-21 19:52:44 UTC (rev 184730)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;APIPageGroupHandle.h&quot;
</span><span class="cx"> #include &quot;APIPageHandle.h&quot;
</span><span class="cx"> #include &quot;AuthenticationManager.h&quot;
</span><ins>+#include &quot;ChildProcessMessages.h&quot;
</ins><span class="cx"> #include &quot;CustomProtocolManager.h&quot;
</span><span class="cx"> #include &quot;DrawingArea.h&quot;
</span><span class="cx"> #include &quot;EventDispatcher.h&quot;
</span><span class="lines">@@ -634,6 +635,11 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (decoder.messageReceiverName() == Messages::ChildProcess::messageReceiverName()) {
+        ChildProcess::didReceiveMessage(connection, decoder);
+        return;
+    }
+
</ins><span class="cx">     LOG_ERROR(&quot;Unhandled web process message '%s:%s'&quot;, decoder.messageReceiverName().toString().data(), decoder.messageName().toString().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>