<!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>[192761] trunk</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/192761">192761</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-11-24 00:01:35 -0800 (Tue, 24 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] Use the network process unconditionally
https://bugs.webkit.org/show_bug.cgi?id=151541

Reviewed by Alex Christensen.

Source/WebKit2:

Make the shared secondary process model become multiple secondary
process model with a limit of 1 web process. Use the same options
when creating a context with legacy configuration (unit tests and
inspector proxy).

* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(webkit_web_context_set_process_model):
(webkit_web_context_get_process_model):
(webkit_web_context_set_web_process_count_limit):
(webkit_web_context_get_web_process_count_limit):
(toWebKitProcessModel): Deleted.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::setIgnoreTLSErrors):
(WebKit::WebProcessPool::platformInitializeWebProcess):

Tools:

Fix TestInspectorServer test. Do not assume we already have the
title we want when the page has been loaded, since the title is
changed afterwards. So, check if the title has already been set,
and if not wait for it.

* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(openRemoteDebuggingSession):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessgtkNetworkProcessMainGtkcpp">trunk/Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIProcessPoolConfigurationcpp">trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebProcessPoolGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkTestInspectorServercpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Source/WebKit2/ChangeLog        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-11-23  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Use the network process unconditionally
+        https://bugs.webkit.org/show_bug.cgi?id=151541
+
+        Reviewed by Alex Christensen.
+
+        Make the shared secondary process model become multiple secondary
+        process model with a limit of 1 web process. Use the same options
+        when creating a context with legacy configuration (unit tests and
+        inspector proxy).
+
+        * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
+        * UIProcess/API/APIProcessPoolConfiguration.cpp:
+        (API::ProcessPoolConfiguration::createWithLegacyOptions):
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (webkitWebContextConstructed):
+        (webkit_web_context_set_process_model):
+        (webkit_web_context_get_process_model):
+        (webkit_web_context_set_web_process_count_limit):
+        (webkit_web_context_get_web_process_count_limit):
+        (toWebKitProcessModel): Deleted.
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        * UIProcess/gtk/WebProcessPoolGtk.cpp:
+        (WebKit::WebProcessPool::setIgnoreTLSErrors):
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+
</ins><span class="cx"> 2015-11-23  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: inspector settings should not be shared between different inspection levels
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessgtkNetworkProcessMainGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -43,16 +43,6 @@
</span><span class="cx">         SoupNetworkSession::defaultSession().setSSLPolicy(SoupNetworkSession::SSLUseSystemCAFile);
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><del>-
-    void platformFinalize() override
-    {
-#if !ENABLE(NETWORK_CACHE)
-        if (SoupCache* soupCache = SoupNetworkSession::defaultSession().cache()) {
-            soup_cache_flush(soupCache);
-            soup_cache_dump(soupCache);
-        }
-#endif
-    }
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> int NetworkProcessMainUnix(int argc, char** argv)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIProcessPoolConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -41,8 +41,16 @@
</span><span class="cx">     auto configuration = ProcessPoolConfiguration::create();
</span><span class="cx"> 
</span><span class="cx">     configuration-&gt;m_shouldHaveLegacyDataStore = true;
</span><ins>+#if PLATFORM(GTK)
+    // FIXME: Remove this ifdef once all ports have switched to use always NetworkProcess.
+    // See https://bugs.webkit.org/show_bug.cgi?id=151418.
+    configuration-&gt;m_processModel = WebKit::ProcessModelMultipleSecondaryProcesses;
+    configuration-&gt;m_maximumProcessCount = 1;
+    configuration-&gt;m_useNetworkProcess = true;
+#else
</ins><span class="cx">     configuration-&gt;m_processModel = WebKit::ProcessModelSharedSecondaryProcess;
</span><span class="cx">     configuration-&gt;m_useNetworkProcess = false;
</span><ins>+#endif
</ins><span class="cx">     configuration-&gt;m_cacheModel = WebKit::CacheModelDocumentViewer;
</span><span class="cx"> 
</span><span class="cx">     configuration-&gt;m_applicationCacheDirectory = WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -179,6 +179,8 @@
</span><span class="cx"> 
</span><span class="cx">     CString faviconDatabaseDirectory;
</span><span class="cx">     WebKitTLSErrorsPolicy tlsErrorsPolicy;
</span><ins>+    WebKitProcessModel processModel;
+    unsigned processCountLimit;
</ins><span class="cx"> 
</span><span class="cx">     HashMap&lt;uint64_t, WebKitWebView*&gt; webViews;
</span><span class="cx"> 
</span><span class="lines">@@ -193,32 +195,6 @@
</span><span class="cx"> 
</span><span class="cx"> WEBKIT_DEFINE_TYPE(WebKitWebContext, webkit_web_context, G_TYPE_OBJECT)
</span><span class="cx"> 
</span><del>-static inline WebKit::ProcessModel toProcessModel(WebKitProcessModel webKitProcessModel)
-{
-    switch (webKitProcessModel) {
-    case WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS:
-        return ProcessModelSharedSecondaryProcess;
-    case WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES:
-        return ProcessModelMultipleSecondaryProcesses;
-    default:
-        ASSERT_NOT_REACHED();
-        return ProcessModelSharedSecondaryProcess;
-    }
-}
-
-static inline WebKitProcessModel toWebKitProcessModel(WebKit::ProcessModel processModel)
-{
-    switch (processModel) {
-    case ProcessModelSharedSecondaryProcess:
-        return WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS;
-    case ProcessModelMultipleSecondaryProcesses:
-        return WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES;
-    default:
-        ASSERT_NOT_REACHED();
-        return WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS;
-    }
-}
-
</del><span class="cx"> static const char* injectedBundleDirectory()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(DEVELOPER_MODE)
</span><span class="lines">@@ -285,8 +261,7 @@
</span><span class="cx"> 
</span><span class="cx">     API::ProcessPoolConfiguration configuration;
</span><span class="cx">     configuration.setInjectedBundlePath(WebCore::filenameToString(bundleFilename.get()));
</span><del>-    configuration.setProcessModel(ProcessModelSharedSecondaryProcess);
-    configuration.setUseNetworkProcess(false);
</del><ins>+    configuration.setMaximumProcessCount(1);
</ins><span class="cx"> 
</span><span class="cx">     WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);
</span><span class="cx">     WebKitWebContextPrivate* priv = webContext-&gt;priv;
</span><span class="lines">@@ -1169,13 +1144,18 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
</span><span class="cx"> 
</span><del>-    ProcessModel newProcessModel(toProcessModel(processModel));
-
-    if (newProcessModel == context-&gt;priv-&gt;context-&gt;processModel())
</del><ins>+    if (processModel == context-&gt;priv-&gt;processModel)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    context-&gt;priv-&gt;context-&gt;setUsesNetworkProcess(newProcessModel == ProcessModelMultipleSecondaryProcesses);
-    context-&gt;priv-&gt;context-&gt;setProcessModel(newProcessModel);
</del><ins>+    context-&gt;priv-&gt;processModel = processModel;
+    switch (context-&gt;priv-&gt;processModel) {
+    case WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS:
+        context-&gt;priv-&gt;context-&gt;setMaximumNumberOfProcesses(1);
+        break;
+    case WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES:
+        context-&gt;priv-&gt;context-&gt;setMaximumNumberOfProcesses(context-&gt;priv-&gt;processCountLimit);
+        break;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1193,7 +1173,7 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
</span><span class="cx"> 
</span><del>-    return toWebKitProcessModel(context-&gt;priv-&gt;context-&gt;processModel());
</del><ins>+    return context-&gt;priv-&gt;processModel;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1214,10 +1194,12 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
</span><span class="cx"> 
</span><del>-    if (limit == context-&gt;priv-&gt;context-&gt;configuration().maximumProcessCount())
</del><ins>+    if (context-&gt;priv-&gt;processCountLimit == limit)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    context-&gt;priv-&gt;context-&gt;setMaximumNumberOfProcesses(limit);
</del><ins>+    context-&gt;priv-&gt;processCountLimit = limit;
+    if (context-&gt;priv-&gt;processModel != WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS)
+        context-&gt;priv-&gt;context-&gt;setMaximumNumberOfProcesses(limit);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1234,7 +1216,7 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0);
</span><span class="cx"> 
</span><del>-    return context-&gt;priv-&gt;context-&gt;configuration().maximumProcessCount();
</del><ins>+    return context-&gt;priv-&gt;processCountLimit;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebKitDownload* webkitWebContextGetOrCreateDownload(DownloadProxy* downloadProxy)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebKitWebViewBasePrivate.h&quot;
</span><span class="cx"> #include &quot;WebPageGroup.h&quot;
</span><ins>+#include &quot;WebProcessPool.h&quot;
</ins><span class="cx"> #include &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #include &lt;WebCore/FileSystem.h&gt;
</span><span class="cx"> #include &lt;WebCore/GtkUtilities.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebProcessPoolGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -95,16 +95,6 @@
</span><span class="cx">         parameters.urlSchemesRegisteredAsLocal.append(&quot;resource&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!usesNetworkProcess()) {
-        parameters.urlSchemesRegisteredForCustomProtocols = supplement&lt;WebSoupCustomProtocolRequestManager&gt;()-&gt;registeredSchemesForCustomProtocols();
-
-        supplement&lt;WebCookieManagerProxy&gt;()-&gt;getCookiePersistentStorage(parameters.cookiePersistentStoragePath, parameters.cookiePersistentStorageType);
-        parameters.cookieAcceptPolicy = m_initialHTTPCookieAcceptPolicy;
-
-        parameters.ignoreTLSErrors = m_ignoreTLSErrors;
-        parameters.diskCacheDirectory = m_configuration-&gt;diskCacheDirectory();
-    }
-
</del><span class="cx">     parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModelDocumentViewer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -146,11 +136,8 @@
</span><span class="cx"> void WebProcessPool::setIgnoreTLSErrors(bool ignoreTLSErrors)
</span><span class="cx"> {
</span><span class="cx">     m_ignoreTLSErrors = ignoreTLSErrors;
</span><del>-    if (usesNetworkProcess() &amp;&amp; networkProcess()) {
</del><ins>+    if (networkProcess())
</ins><span class="cx">         networkProcess()-&gt;send(Messages::NetworkProcess::SetIgnoreTLSErrors(m_ignoreTLSErrors), 0);
</span><del>-        return;
-    }
-    sendToAllProcesses(Messages::WebProcess::SetIgnoreTLSErrors(m_ignoreTLSErrors));
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Tools/ChangeLog        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-11-23  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Use the network process unconditionally
+        https://bugs.webkit.org/show_bug.cgi?id=151541
+
+        Reviewed by Alex Christensen.
+
+        Fix TestInspectorServer test. Do not assume we already have the
+        title we want when the page has been loaded, since the title is
+        changed afterwards. So, check if the title has already been set,
+        and if not wait for it.
+
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
+        (openRemoteDebuggingSession):
+
</ins><span class="cx"> 2015-11-23  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkTestInspectorServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp (192760 => 192761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp        2015-11-24 07:13:03 UTC (rev 192760)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp        2015-11-24 08:01:35 UTC (rev 192761)
</span><span class="lines">@@ -237,12 +237,10 @@
</span><span class="cx">     test-&gt;loadURI(resolvedURL.utf8().data());
</span><span class="cx">     test-&gt;waitUntilLoadFinished();
</span><span class="cx"> 
</span><del>-    javascriptResult = test-&gt;runJavaScriptAndWaitUntilFinished(&quot;document.title&quot;, &amp;error.outPtr());
-    g_assert(javascriptResult);
-    g_assert(!error.get());
-
-    GUniquePtr&lt;char&gt; title(WebViewTest::javascriptResultToCString(javascriptResult));
-    g_assert_cmpstr(title.get(), ==, &quot;127.0.0.1&quot;);
</del><ins>+    const char* title = webkit_web_view_get_title(test-&gt;m_webView);
+    if (!title || !*title)
+        test-&gt;waitUntilTitleChanged();
+    g_assert_cmpstr(webkit_web_view_get_title(test-&gt;m_webView), ==, &quot;127.0.0.1&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void sendIncompleteRequest(InspectorServerTest* test, gconstpointer)
</span></span></pre>
</div>
</div>

</body>
</html>