<!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>[193597] tags/Safari-602.1.13.1</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/193597">193597</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-12-06 14:25:08 -0800 (Sun, 06 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Roll out <a href="http://trac.webkit.org/projects/webkit/changeset/192796">r192796</a>. rdar://problem/23763584</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari6021131SourceWebKit2ChangeLog">tags/Safari-602.1.13.1/Source/WebKit2/ChangeLog</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2NetworkProcessmacRemoteNetworkingContextmm">tags/Safari-602.1.13.1/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2SharedAPIcWKDeprecatedFunctionscpp">tags/Safari-602.1.13.1/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2SharedNetworkCustomProtocolsCocoaCustomProtocolManagerCocoamm">tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2SharedNetworkCustomProtocolsCustomProtocolManagerh">tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2SharedNetworkCustomProtocolssoupCustomProtocolManagerSoupcpp">tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2SharedWebProcessCreationParameterscpp">tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2SharedWebProcessCreationParametersh">tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessAPIAPIProcessPoolConfigurationcpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessAPIAPIProcessPoolConfigurationh">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessAPICWKContextcpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContext.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessAPICWKContextPrivateh">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessAPICocoaWKProcessGroupmm">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessAPIeflewk_contextcpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessCocoaWebProcessPoolCocoamm">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessDownloadsDownloadProxycpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessWebCookieManagerProxycpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessWebProcessPoolcpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessWebProcessPoolh">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessWebProcessProxycpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcessWebProcessProxyh">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2UIProcesseflWebProcessPoolEflcpp">tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcessFileAPIBlobRegistryProxycpp">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcessWebPageWebFramecpp">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcessWebProcesscpp">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcessWebProcessh">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.h</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcessWebProcessmessagesin">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.messages.in</a></li>
<li><a href="#tagsSafari6021131SourceWebKit2WebProcesssoupWebProcessSoupcpp">tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp</a></li>
<li><a href="#tagsSafari6021131ToolsChangeLog">tags/Safari-602.1.13.1/Tools/ChangeLog</a></li>
<li><a href="#tagsSafari6021131ToolsTestWebKitAPITestsWebKit2Geolocationcpp">tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/Geolocation.cpp</a></li>
<li><a href="#tagsSafari6021131ToolsTestWebKitAPITestsWebKit2macGetPIDAfterAbortedProcessLaunchcpp">tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp</a></li>
<li><a href="#tagsSafari6021131ToolsWebKitTestRunnerTestControllercpp">tags/Safari-602.1.13.1/Tools/WebKitTestRunner/TestController.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari6021131SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/ChangeLog (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/ChangeLog        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/ChangeLog        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2015-12-06 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><ins>+ Roll out r192796.
+
+2015-12-06 Babak Shafiei <bshafiei@apple.com>
+
</ins><span class="cx"> Roll out r192808.
</span><span class="cx">
</span><span class="cx"> 2015-12-01 Commit Queue <commit-queue@webkit.org>
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2NetworkProcessmacRemoteNetworkingContextmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -93,13 +93,8 @@
</span><span class="cx"> if (SessionTracker::storageSession(sessionID))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- String base;
- if (SessionTracker::getIdentifierBase().isNull())
- base = [[NSBundle mainBundle] bundleIdentifier];
- else
- base = SessionTracker::getIdentifierBase();
-
- SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(base + '.' + String::number(sessionID.sessionID()))
</del><ins>+ ASSERT(!SessionTracker::getIdentifierBase().isNull());
+ SessionTracker::setSession(sessionID, NetworkStorageSession::createPrivateBrowsingSession(SessionTracker::getIdentifierBase() + '.' + String::number(sessionID.sessionID()))
</ins><span class="cx"> #if USE(NETWORK_SESSION)
</span><span class="cx"> , std::make_unique<NetworkSession>(NetworkSession::Type::Ephemeral, sessionID)
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2SharedAPIcWKDeprecatedFunctionscpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx">
</span><span class="cx"> #include "APIDictionary.h"
</span><span class="cx"> #include "WKArray.h"
</span><del>-#include "WKContextPrivate.h"
</del><span class="cx"> #include "WKMutableDictionary.h"
</span><span class="cx"> #include "WKPreferencesRefPrivate.h"
</span><span class="cx"> #include "WKSharedAPICast.h"
</span><span class="lines">@@ -135,10 +134,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WKContextSetUsesNetworkProcess(WKContextRef, bool)
-{
-}
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext)
</span><span class="cx"> {
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2SharedNetworkCustomProtocolsCocoaCustomProtocolManagerCocoamm"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -132,6 +132,21 @@
</span><span class="cx"> connection->addWorkQueueMessageReceiver(Messages::CustomProtocolManager::messageReceiverName(), m_messageQueue.get(), this);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void CustomProtocolManager::initialize(const WebProcessCreationParameters& parameters)
+{
+ ASSERT(parameters.urlSchemesRegisteredForCustomProtocols.isEmpty() || !parameters.usesNetworkProcess);
+ if (parameters.usesNetworkProcess) {
+ m_childProcess->parentProcessConnection()->removeWorkQueueMessageReceiver(Messages::CustomProtocolManager::messageReceiverName());
+ m_messageQueue = nullptr;
+ return;
+ }
+
+ [NSURLProtocol registerClass:[WKCustomProtocol class]];
+
+ for (size_t i = 0; i < parameters.urlSchemesRegisteredForCustomProtocols.size(); ++i)
+ registerScheme(parameters.urlSchemesRegisteredForCustomProtocols[i]);
+}
+
</ins><span class="cx"> void CustomProtocolManager::initialize(const NetworkProcessCreationParameters& parameters)
</span><span class="cx"> {
</span><span class="cx"> [NSURLProtocol registerClass:[WKCustomProtocol class]];
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2SharedNetworkCustomProtocolsCustomProtocolManagerh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "Connection.h"
</span><span class="cx"> #include "NetworkProcessSupplement.h"
</span><ins>+#include "WebProcessSupplement.h"
</ins><span class="cx"> #include <wtf/WorkQueue.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -57,7 +58,7 @@
</span><span class="cx"> class ChildProcess;
</span><span class="cx"> struct NetworkProcessCreationParameters;
</span><span class="cx">
</span><del>-class CustomProtocolManager : public NetworkProcessSupplement, public IPC::Connection::WorkQueueMessageReceiver {
</del><ins>+class CustomProtocolManager : public WebProcessSupplement, public NetworkProcessSupplement, public IPC::Connection::WorkQueueMessageReceiver {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(CustomProtocolManager);
</span><span class="cx"> public:
</span><span class="cx"> explicit CustomProtocolManager(ChildProcess*);
</span><span class="lines">@@ -79,6 +80,9 @@
</span><span class="cx"> // ChildProcessSupplement
</span><span class="cx"> void initializeConnection(IPC::Connection*) override;
</span><span class="cx">
</span><ins>+ // WebProcessSupplement
+ void initialize(const WebProcessCreationParameters&) override;
+
</ins><span class="cx"> // NetworkProcessSupplement
</span><span class="cx"> void initialize(const NetworkProcessCreationParameters&) override;
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2SharedNetworkCustomProtocolssoupCustomProtocolManagerSoupcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -46,6 +46,18 @@
</span><span class="cx"> connection->addWorkQueueMessageReceiver(Messages::CustomProtocolManager::messageReceiverName(), m_messageQueue.get(), this);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void CustomProtocolManager::initialize(const WebProcessCreationParameters& parameters)
+{
+ ASSERT(parameters.urlSchemesRegisteredForCustomProtocols.isEmpty() || !parameters.usesNetworkProcess);
+ if (parameters.usesNetworkProcess) {
+ m_childProcess->parentProcessConnection()->removeWorkQueueMessageReceiver(Messages::CustomProtocolManager::messageReceiverName());
+ m_messageQueue = nullptr;
+ return;
+ }
+ for (size_t i = 0; i < parameters.urlSchemesRegisteredForCustomProtocols.size(); ++i)
+ registerScheme(parameters.urlSchemesRegisteredForCustomProtocols[i]);
+}
+
</ins><span class="cx"> void CustomProtocolManager::initialize(const NetworkProcessCreationParameters& parameters)
</span><span class="cx"> {
</span><span class="cx"> for (size_t i = 0; i < parameters.urlSchemesRegisteredForCustomProtocols.size(); ++i)
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> , shouldEnableJIT(false)
</span><span class="cx"> , shouldEnableFTLJIT(false)
</span><span class="cx"> #endif
</span><ins>+ , usesNetworkProcess(false)
</ins><span class="cx"> , memoryCacheDisabled(false)
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="cx"> , hasImageServices(false)
</span><span class="lines">@@ -90,6 +91,14 @@
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><span class="cx"> encoder << urlSchemesRegisteredAsCachePartitioned;
</span><span class="cx"> #endif
</span><ins>+ encoder << urlSchemesRegisteredForCustomProtocols;
+#if USE(SOUP)
+ encoder << diskCacheDirectory;
+ encoder << cookiePersistentStoragePath;
+ encoder << cookiePersistentStorageType;
+ encoder.encodeEnum(cookieAcceptPolicy);
+ encoder << ignoreTLSErrors;
+#endif
</ins><span class="cx"> encoder.encodeEnum(cacheModel);
</span><span class="cx"> encoder << shouldAlwaysUseComplexTextCodePath;
</span><span class="cx"> encoder << shouldEnableMemoryPressureReliefLogging;
</span><span class="lines">@@ -122,6 +131,8 @@
</span><span class="cx"> encoder << notificationPermissions;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ encoder << usesNetworkProcess;
+
</ins><span class="cx"> encoder << plugInAutoStartOriginHashes;
</span><span class="cx"> encoder << plugInAutoStartOrigins;
</span><span class="cx"> encoder << memoryCacheDisabled;
</span><span class="lines">@@ -199,6 +210,20 @@
</span><span class="cx"> if (!decoder.decode(parameters.urlSchemesRegisteredAsCachePartitioned))
</span><span class="cx"> return false;
</span><span class="cx"> #endif
</span><ins>+ if (!decoder.decode(parameters.urlSchemesRegisteredForCustomProtocols))
+ return false;
+#if USE(SOUP)
+ if (!decoder.decode(parameters.diskCacheDirectory))
+ return false;
+ if (!decoder.decode(parameters.cookiePersistentStoragePath))
+ return false;
+ if (!decoder.decode(parameters.cookiePersistentStorageType))
+ return false;
+ if (!decoder.decodeEnum(parameters.cookieAcceptPolicy))
+ return false;
+ if (!decoder.decode(parameters.ignoreTLSErrors))
+ return false;
+#endif
</ins><span class="cx"> if (!decoder.decodeEnum(parameters.cacheModel))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(parameters.shouldAlwaysUseComplexTextCodePath))
</span><span class="lines">@@ -262,6 +287,9 @@
</span><span class="cx"> return false;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ if (!decoder.decode(parameters.usesNetworkProcess))
+ return false;
+
</ins><span class="cx"> if (!decoder.decode(parameters.plugInAutoStartOriginHashes))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(parameters.plugInAutoStartOrigins))
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/Shared/WebProcessCreationParameters.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -99,6 +99,14 @@
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><span class="cx"> Vector<String> urlSchemesRegisteredAsCachePartitioned;
</span><span class="cx"> #endif
</span><ins>+ Vector<String> urlSchemesRegisteredForCustomProtocols;
+#if USE(SOUP)
+ String diskCacheDirectory;
+ String cookiePersistentStoragePath;
+ uint32_t cookiePersistentStorageType;
+ HTTPCookieAcceptPolicy cookieAcceptPolicy;
+ bool ignoreTLSErrors;
+#endif
</ins><span class="cx">
</span><span class="cx"> CacheModel cacheModel;
</span><span class="cx">
</span><span class="lines">@@ -146,6 +154,8 @@
</span><span class="cx"> HashMap<String, bool> notificationPermissions;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ bool usesNetworkProcess;
+
</ins><span class="cx"> HashMap<WebCore::SessionID, HashMap<unsigned, double>> plugInAutoStartOriginHashes;
</span><span class="cx"> Vector<String> plugInAutoStartOrigins;
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessAPIAPIProcessPoolConfigurationcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -46,8 +46,10 @@
</span><span class="cx"> // See https://bugs.webkit.org/show_bug.cgi?id=151418.
</span><span class="cx"> configuration->m_processModel = WebKit::ProcessModelMultipleSecondaryProcesses;
</span><span class="cx"> configuration->m_maximumProcessCount = 1;
</span><ins>+ configuration->m_useNetworkProcess = true;
</ins><span class="cx"> #else
</span><span class="cx"> configuration->m_processModel = WebKit::ProcessModelSharedSecondaryProcess;
</span><ins>+ configuration->m_useNetworkProcess = false;
</ins><span class="cx"> #endif
</span><span class="cx"> configuration->m_cacheModel = WebKit::CacheModelDocumentViewer;
</span><span class="cx">
</span><span class="lines">@@ -81,6 +83,7 @@
</span><span class="cx">
</span><span class="cx"> copy->m_shouldHaveLegacyDataStore = this->m_shouldHaveLegacyDataStore;
</span><span class="cx"> copy->m_processModel = this->m_processModel;
</span><ins>+ copy->m_useNetworkProcess = this->m_useNetworkProcess;
</ins><span class="cx"> copy->m_maximumProcessCount = this->m_maximumProcessCount;
</span><span class="cx"> copy->m_cacheModel = this->m_cacheModel;
</span><span class="cx"> copy->m_diskCacheSizeOverride = this->m_diskCacheSizeOverride;
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessAPIAPIProcessPoolConfigurationh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -51,6 +51,9 @@
</span><span class="cx"> WebKit::ProcessModel processModel() const { return m_processModel; }
</span><span class="cx"> void setProcessModel(WebKit::ProcessModel processModel) { m_processModel = processModel; }
</span><span class="cx">
</span><ins>+ bool useNetworkProcess() const { return m_useNetworkProcess; }
+ void setUseNetworkProcess(bool useNetworkProcess) { m_useNetworkProcess = useNetworkProcess; }
+
</ins><span class="cx"> unsigned maximumProcessCount() const { return m_maximumProcessCount; }
</span><span class="cx"> void setMaximumProcessCount(unsigned maximumProcessCount) { m_maximumProcessCount = maximumProcessCount; }
</span><span class="cx">
</span><span class="lines">@@ -94,6 +97,7 @@
</span><span class="cx"> bool m_shouldHaveLegacyDataStore { false };
</span><span class="cx">
</span><span class="cx"> WebKit::ProcessModel m_processModel { WebKit::ProcessModelMultipleSecondaryProcesses };
</span><ins>+ bool m_useNetworkProcess { true };
</ins><span class="cx"> unsigned m_maximumProcessCount { 0 };
</span><span class="cx"> WebKit::CacheModel m_cacheModel { WebKit::CacheModelPrimaryWebBrowser };
</span><span class="cx"> int64_t m_diskCacheSizeOverride { -1 };
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessAPICWKContextcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContext.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContext.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContext.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -549,6 +549,11 @@
</span><span class="cx"> toImpl(contextRef)->setJavaScriptGarbageCollectorTimerEnabled(enable);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WKContextSetUsesNetworkProcess(WKContextRef contextRef, bool usesNetworkProcess)
+{
+ toImpl(contextRef)->setUsesNetworkProcess(usesNetworkProcess);
+}
+
</ins><span class="cx"> void WKContextUseTestingNetworkSession(WKContextRef context)
</span><span class="cx"> {
</span><span class="cx"> toImpl(context)->useTestingNetworkSession();
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessAPICWKContextPrivateh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: This function is temporary and useful during the development of the NetworkProcess feature.
</span><span class="cx"> // At some point it should be removed.
</span><del>-WK_EXPORT void WKContextSetUsesNetworkProcess(WKContextRef, bool);
</del><ins>+WK_EXPORT void WKContextSetUsesNetworkProcess(WKContextRef context, bool usesNetworkProcess);
</ins><span class="cx">
</span><span class="cx"> // Test only. Should be called before any secondary processes are started.
</span><span class="cx"> WK_EXPORT void WKContextUseTestingNetworkSession(WKContextRef context);
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessAPICocoaWKProcessGroupmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -193,6 +193,7 @@
</span><span class="cx"> auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions();
</span><span class="cx"> configuration->setInjectedBundlePath(bundleURL ? String(bundleURL.path) : String());
</span><span class="cx"> #if PLATFORM(IOS)
</span><ins>+ configuration->setUseNetworkProcess(true);
</ins><span class="cx"> configuration->setProcessModel(ProcessModelMultipleSecondaryProcesses);
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessAPIeflewk_contextcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -277,6 +277,7 @@
</span><span class="cx"> if (WKContextGetProcessModel(m_context.get()) == newWKProcessModel)
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ WKContextSetUsesNetworkProcess(m_context.get(), newWKProcessModel == kWKProcessModelMultipleSecondaryProcesses);
</ins><span class="cx"> WKContextSetProcessModel(m_context.get(), newWKProcessModel);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessCocoaWebProcessPoolCocoamm"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::updateProcessSuppressionState()
</span><span class="cx"> {
</span><del>- if (m_networkProcess)
</del><ins>+ if (usesNetworkProcess() && m_networkProcess)
</ins><span class="cx"> m_networkProcess->setProcessSuppressionEnabled(processSuppressionEnabled());
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="lines">@@ -190,6 +190,11 @@
</span><span class="cx">
</span><span class="cx"> parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]);
</span><span class="cx">
</span><ins>+ if (!usesNetworkProcess()) {
+ for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
+ parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
+ }
+
</ins><span class="cx"> parameters.fontWhitelist = m_fontWhitelist;
</span><span class="cx">
</span><span class="cx"> if (m_bundleParameters) {
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessDownloadsDownloadProxycpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -71,8 +71,13 @@
</span><span class="cx"> if (!m_processPool)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (NetworkProcessProxy* networkProcess = m_processPool->networkProcess())
- networkProcess->connection()->send(Messages::NetworkProcess::CancelDownload(m_downloadID), 0);
</del><ins>+ if (m_processPool->usesNetworkProcess()) {
+ if (NetworkProcessProxy* networkProcess = m_processPool->networkProcess())
+ networkProcess->connection()->send(Messages::NetworkProcess::CancelDownload(m_downloadID), 0);
+ return;
+ }
+
+ m_processPool->sendToAllProcesses(Messages::WebProcess::CancelDownload(m_downloadID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::invalidate()
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessWebCookieManagerProxycpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -163,7 +163,8 @@
</span><span class="cx"> // - When testing, we only have one WebProcess and one NetworkProcess, and WebKitTestRunner never restarts them;
</span><span class="cx"> // - When not testing, Cocoa has the policy persisted, and thus new processes use it (even for ephemeral sessions).
</span><span class="cx"> processPool()->sendToAllProcesses(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy));
</span><del>- processPool()->sendToNetworkingProcess(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy));
</del><ins>+ if (processPool()->usesNetworkProcess())
+ processPool()->sendToNetworkingProcess(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::getHTTPCookieAcceptPolicy(std::function<void (HTTPCookieAcceptPolicy, CallbackBase::Error)> callbackFunction)
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -158,6 +158,9 @@
</span><span class="cx"> , m_processTerminationEnabled(true)
</span><span class="cx"> , m_canHandleHTTPSServerTrustEvaluation(true)
</span><span class="cx"> , m_didNetworkProcessCrash(false)
</span><ins>+#if USE(SOUP)
+ , m_ignoreTLSErrors(true)
+#endif
</ins><span class="cx"> , m_memoryCacheDisabled(false)
</span><span class="cx"> , m_userObservablePageCounter([this](bool) { updateProcessSuppressionState(); })
</span><span class="cx"> , m_processSuppressionDisabledForPageCounter([this](bool) { updateProcessSuppressionState(); })
</span><span class="lines">@@ -303,7 +306,17 @@
</span><span class="cx">
</span><span class="cx"> IPC::Connection* WebProcessPool::networkingProcessConnection()
</span><span class="cx"> {
</span><del>- return m_networkProcess->connection();
</del><ins>+ switch (processModel()) {
+ case ProcessModelSharedSecondaryProcess:
+ if (usesNetworkProcess())
+ return m_networkProcess->connection();
+ return m_processes[0]->connection();
+ case ProcessModelMultipleSecondaryProcesses:
+ ASSERT(usesNetworkProcess());
+ return m_networkProcess->connection();
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::languageChanged(void* context)
</span><span class="lines">@@ -315,7 +328,7 @@
</span><span class="cx"> {
</span><span class="cx"> sendToAllProcesses(Messages::WebProcess::UserPreferredLanguagesChanged(userPreferredLanguages()));
</span><span class="cx"> #if USE(SOUP)
</span><del>- if (m_networkProcess)
</del><ins>+ if (usesNetworkProcess() && m_networkProcess)
</ins><span class="cx"> m_networkProcess->send(Messages::NetworkProcess::UserPreferredLanguagesChanged(userPreferredLanguages()), 0);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -330,6 +343,16 @@
</span><span class="cx"> sendToAllProcesses(Messages::WebProcess::SetTextCheckerState(TextChecker::state()));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebProcessPool::setUsesNetworkProcess(bool usesNetworkProcess)
+{
+ m_configuration->setUseNetworkProcess(usesNetworkProcess);
+}
+
+bool WebProcessPool::usesNetworkProcess() const
+{
+ return m_configuration->useNetworkProcess();
+}
+
</ins><span class="cx"> NetworkProcessProxy& WebProcessPool::ensureNetworkProcess()
</span><span class="cx"> {
</span><span class="cx"> if (m_networkProcess)
</span><span class="lines">@@ -481,7 +504,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_iconDatabase->setPrivateBrowsingEnabled(privateBrowsingEnabled);
</span><span class="cx">
</span><del>- if (networkProcess()) {
</del><ins>+ if (usesNetworkProcess() && networkProcess()) {
</ins><span class="cx"> if (privateBrowsingEnabled)
</span><span class="cx"> networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
</span><span class="cx"> else
</span><span class="lines">@@ -531,7 +554,8 @@
</span><span class="cx">
</span><span class="cx"> WebProcessProxy& WebProcessPool::createNewWebProcess()
</span><span class="cx"> {
</span><del>- ensureNetworkProcess();
</del><ins>+ if (usesNetworkProcess())
+ ensureNetworkProcess();
</ins><span class="cx">
</span><span class="cx"> Ref<WebProcessProxy> process = WebProcessProxy::create(*this);
</span><span class="cx">
</span><span class="lines">@@ -608,6 +632,8 @@
</span><span class="cx"> supplement<WebNotificationManagerProxy>()->populateCopyOfNotificationPermissions(parameters.notificationPermissions);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ parameters.usesNetworkProcess = usesNetworkProcess();
+
</ins><span class="cx"> parameters.plugInAutoStartOriginHashes = m_plugInAutoStartProvider.autoStartOriginHashesCopy();
</span><span class="cx"> copyToVector(m_plugInAutoStartProvider.autoStartOrigins(), parameters.plugInAutoStartOrigins);
</span><span class="cx">
</span><span class="lines">@@ -815,14 +841,16 @@
</span><span class="cx"> DownloadProxy* WebProcessPool::download(WebPageProxy* initiatingPage, const ResourceRequest& request)
</span><span class="cx"> {
</span><span class="cx"> DownloadProxy* downloadProxy = createDownloadProxy(request);
</span><ins>+ uint64_t initiatingPageID = initiatingPage ? initiatingPage->pageID() : 0;
</ins><span class="cx"> SessionID sessionID = initiatingPage ? initiatingPage->sessionID() : SessionID::defaultSessionID();
</span><span class="cx">
</span><del>- if (networkProcess()) {
</del><ins>+ if (usesNetworkProcess() && networkProcess()) {
</ins><span class="cx"> // FIXME (NetworkProcess): Replicate whatever FrameLoader::setOriginalURLForDownloadRequest does with the request here.
</span><span class="cx"> networkProcess()->send(Messages::NetworkProcess::DownloadRequest(sessionID, downloadProxy->downloadID(), request), 0);
</span><span class="cx"> return downloadProxy;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ m_processes[0]->send(Messages::WebProcess::DownloadRequest(sessionID, downloadProxy->downloadID(), initiatingPageID, request), 0);
</ins><span class="cx"> return downloadProxy;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -834,11 +862,12 @@
</span><span class="cx"> if (!path.isEmpty())
</span><span class="cx"> SandboxExtension::createHandle(path, SandboxExtension::ReadWrite, sandboxExtensionHandle);
</span><span class="cx">
</span><del>- if (networkProcess()) {
</del><ins>+ if (usesNetworkProcess() && networkProcess()) {
</ins><span class="cx"> networkProcess()->send(Messages::NetworkProcess::ResumeDownload(downloadProxy->downloadID(), resumeData->dataReference(), path, sandboxExtensionHandle), 0);
</span><span class="cx"> return downloadProxy;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ m_processes[0]->send(Messages::WebProcess::ResumeDownload(downloadProxy->downloadID(), resumeData->dataReference(), path, sandboxExtensionHandle), 0);
</ins><span class="cx"> return downloadProxy;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -925,7 +954,7 @@
</span><span class="cx"> void WebProcessPool::setCanHandleHTTPSServerTrustEvaluation(bool value)
</span><span class="cx"> {
</span><span class="cx"> m_canHandleHTTPSServerTrustEvaluation = value;
</span><del>- if (m_networkProcess) {
</del><ins>+ if (usesNetworkProcess() && m_networkProcess) {
</ins><span class="cx"> m_networkProcess->send(Messages::NetworkProcess::SetCanHandleHTTPSServerTrustEvaluation(value), 0);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -996,7 +1025,7 @@
</span><span class="cx"> m_configuration->setCacheModel(cacheModel);
</span><span class="cx"> sendToAllProcesses(Messages::WebProcess::SetCacheModel(cacheModel));
</span><span class="cx">
</span><del>- if (m_networkProcess)
</del><ins>+ if (usesNetworkProcess() && m_networkProcess)
</ins><span class="cx"> m_networkProcess->send(Messages::NetworkProcess::SetCacheModel(cacheModel), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1007,7 +1036,13 @@
</span><span class="cx">
</span><span class="cx"> DownloadProxy* WebProcessPool::createDownloadProxy(const ResourceRequest& request)
</span><span class="cx"> {
</span><del>- return ensureNetworkProcess().createDownloadProxy(request);
</del><ins>+ if (usesNetworkProcess()) {
+ ensureNetworkProcess();
+ ASSERT(m_networkProcess);
+ return m_networkProcess->createDownloadProxy(request);
+ }
+
+ return ensureSharedWebProcess().createDownloadProxy(request);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver)
</span><span class="lines">@@ -1117,8 +1152,22 @@
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::allowSpecificHTTPSCertificateForHost(const WebCertificateInfo* certificate, const String& host)
</span><span class="cx"> {
</span><del>- if (m_networkProcess)
</del><ins>+ if (usesNetworkProcess() && m_networkProcess) {
</ins><span class="cx"> m_networkProcess->send(Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
</span><ins>+ return;
+ }
+
+#if USE(SOUP)
+ m_processes[0]->send(Messages::WebProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
+ return;
+#else
+ UNUSED_PARAM(certificate);
+ UNUSED_PARAM(host);
+#endif
+
+#if !PLATFORM(IOS)
+ ASSERT_NOT_REACHED();
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::setHTTPPipeliningEnabled(bool enabled)
</span><span class="lines">@@ -1172,7 +1221,7 @@
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::requestNetworkingStatistics(StatisticsRequest* request)
</span><span class="cx"> {
</span><del>- if (!m_networkProcess) {
</del><ins>+ if (!usesNetworkProcess() || !m_networkProcess) {
</ins><span class="cx"> LOG_ERROR("Attempt to get NetworkProcess statistics but the NetworkProcess is unavailable");
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessPool.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -277,6 +277,10 @@
</span><span class="cx"> void setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(API::Dictionary&, double time);
</span><span class="cx">
</span><span class="cx"> // Network Process Management
</span><ins>+
+ void setUsesNetworkProcess(bool);
+ bool usesNetworkProcess() const;
+
</ins><span class="cx"> NetworkProcessProxy& ensureNetworkProcess();
</span><span class="cx"> NetworkProcessProxy* networkProcess() { return m_networkProcess.get(); }
</span><span class="cx"> void networkProcessCrashed(NetworkProcessProxy*);
</span><span class="lines">@@ -521,15 +525,43 @@
</span><span class="cx"> template<typename T>
</span><span class="cx"> void WebProcessPool::sendToNetworkingProcess(T&& message)
</span><span class="cx"> {
</span><del>- if (m_networkProcess && m_networkProcess->canSendMessage())
- m_networkProcess->send(std::forward<T>(message), 0);
</del><ins>+ switch (processModel()) {
+ case ProcessModelSharedSecondaryProcess:
+ if (usesNetworkProcess()) {
+ if (m_networkProcess && m_networkProcess->canSendMessage())
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+ }
+ if (!m_processes.isEmpty() && m_processes[0]->canSendMessage())
+ m_processes[0]->send(std::forward<T>(message), 0);
+ return;
+ case ProcessModelMultipleSecondaryProcesses:
+ if (m_networkProcess && m_networkProcess->canSendMessage())
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+ }
+ ASSERT_NOT_REACHED();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename T>
</span><span class="cx"> void WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary(T&& message)
</span><span class="cx"> {
</span><del>- ensureNetworkProcess();
- m_networkProcess->send(std::forward<T>(message), 0);
</del><ins>+ switch (processModel()) {
+ case ProcessModelSharedSecondaryProcess:
+ if (usesNetworkProcess()) {
+ ensureNetworkProcess();
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+ }
+ ensureSharedWebProcess();
+ m_processes[0]->send(std::forward<T>(message), 0);
+ return;
+ case ProcessModelMultipleSecondaryProcesses:
+ ensureNetworkProcess();
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+ }
+ ASSERT_NOT_REACHED();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename T>
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -202,6 +202,9 @@
</span><span class="cx"> frames[i]->webProcessWillShutDown();
</span><span class="cx"> m_frameMap.clear();
</span><span class="cx">
</span><ins>+ if (m_downloadProxyMap)
+ m_downloadProxyMap->processDidClose();
+
</ins><span class="cx"> for (VisitedLinkStore* visitedLinkStore : m_visitedLinkStores)
</span><span class="cx"> visitedLinkStore->removeProcess(*this);
</span><span class="cx"> m_visitedLinkStores.clear();
</span><span class="lines">@@ -253,7 +256,7 @@
</span><span class="cx">
</span><span class="cx"> // If this was the last WebPage open in that web process, and we have no other reason to keep it alive, let it go.
</span><span class="cx"> // We only allow this when using a network process, as otherwise the WebProcess needs to preserve its session state.
</span><del>- if (state() == State::Terminated || !canTerminateChildProcess())
</del><ins>+ if (!m_processPool->usesNetworkProcess() || state() == State::Terminated || !canTerminateChildProcess())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> shutDown();
</span><span class="lines">@@ -652,6 +655,9 @@
</span><span class="cx"> if (!m_pageMap.isEmpty())
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+ if (m_downloadProxyMap && !m_downloadProxyMap->isEmpty())
+ return false;
+
</ins><span class="cx"> if (!m_pendingDeleteWebsiteDataCallbacks.isEmpty())
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -694,6 +700,16 @@
</span><span class="cx"> send(Messages::WebProcess::SetTextCheckerState(TextChecker::state()), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+DownloadProxy* WebProcessProxy::createDownloadProxy(const ResourceRequest& request)
+{
+ ASSERT(!m_processPool->usesNetworkProcess());
+
+ if (!m_downloadProxyMap)
+ m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
+
+ return m_downloadProxyMap->createDownloadProxy(m_processPool, request);
+}
+
</ins><span class="cx"> void WebProcessProxy::didSaveToPageCache()
</span><span class="cx"> {
</span><span class="cx"> m_processPool->processDidCachePage(this);
</span><span class="lines">@@ -956,12 +972,14 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case AssertionState::Background:
</span><del>- m_backgroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().backgroundActivityToken();
</del><ins>+ if (processPool().usesNetworkProcess())
+ m_backgroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().backgroundActivityToken();
</ins><span class="cx"> m_foregroundTokenForNetworkProcess = nullptr;
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case AssertionState::Foreground:
</span><del>- m_foregroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().foregroundActivityToken();
</del><ins>+ if (processPool().usesNetworkProcess())
+ m_foregroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().foregroundActivityToken();
</ins><span class="cx"> m_backgroundTokenForNetworkProcess = nullptr;
</span><span class="cx"> for (auto& page : m_pageMap.values())
</span><span class="cx"> page->processWillBecomeForeground();
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/WebProcessProxy.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class DownloadProxyMap;
</ins><span class="cx"> class NetworkProcessProxy;
</span><span class="cx"> class WebBackForwardListItem;
</span><span class="cx"> class WebPageGroup;
</span><span class="lines">@@ -119,6 +120,8 @@
</span><span class="cx">
</span><span class="cx"> static bool fullKeyboardAccessEnabled();
</span><span class="cx">
</span><ins>+ DownloadProxy* createDownloadProxy(const WebCore::ResourceRequest&);
+
</ins><span class="cx"> void didSaveToPageCache();
</span><span class="cx"> void releasePageCache();
</span><span class="cx">
</span><span class="lines">@@ -239,6 +242,7 @@
</span><span class="cx"> HashSet<VisitedLinkStore*> m_visitedLinkStores;
</span><span class="cx"> HashSet<WebUserContentControllerProxy*> m_webUserContentControllerProxies;
</span><span class="cx">
</span><ins>+ std::unique_ptr<DownloadProxyMap> m_downloadProxyMap;
</ins><span class="cx"> CustomProtocolManagerProxy m_customProtocolManagerProxy;
</span><span class="cx">
</span><span class="cx"> HashMap<uint64_t, std::function<void (WebsiteData)>> m_pendingFetchWebsiteDataCallbacks;
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2UIProcesseflWebProcessPoolEflcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -89,6 +89,12 @@
</span><span class="cx"> void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
</span><span class="cx"> {
</span><span class="cx"> initializeInspectorServer();
</span><ins>+
+ parameters.urlSchemesRegisteredForCustomProtocols = supplement<WebSoupCustomProtocolRequestManager>()->registeredSchemesForCustomProtocols();
+ supplement<WebCookieManagerProxy>()->getCookiePersistentStorage(parameters.cookiePersistentStoragePath, parameters.cookiePersistentStorageType);
+ parameters.cookieAcceptPolicy = m_initialHTTPCookieAcceptPolicy;
+ parameters.ignoreTLSErrors = m_ignoreTLSErrors;
+ parameters.diskCacheDirectory = m_configuration->diskCacheDirectory();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::platformInvalidateContext()
</span><span class="lines">@@ -140,6 +146,7 @@
</span><span class="cx"> void WebProcessPool::setIgnoreTLSErrors(bool ignoreTLSErrors)
</span><span class="cx"> {
</span><span class="cx"> m_ignoreTLSErrors = ignoreTLSErrors;
</span><ins>+ sendToAllProcesses(Messages::WebProcess::SetIgnoreTLSErrors(m_ignoreTLSErrors));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcessFileAPIBlobRegistryProxycpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, PassRefPtr<BlobDataFileReference> file, const String& contentType)
</span><span class="cx"> {
</span><ins>+ ASSERT(WebProcess::singleton().usesNetworkProcess());
+
</ins><span class="cx"> SandboxExtension::Handle extensionHandle;
</span><span class="cx">
</span><span class="cx"> // File path can be empty when submitting a form file input without a file, see bug 111778.
</span><span class="lines">@@ -49,26 +51,36 @@
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::registerBlobURL(const URL& url, Vector<BlobPart> blobParts, const String& contentType)
</span><span class="cx"> {
</span><ins>+ ASSERT(WebProcess::singleton().usesNetworkProcess());
+
</ins><span class="cx"> WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURL(url, blobParts, contentType), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::registerBlobURL(const URL& url, const URL& srcURL)
</span><span class="cx"> {
</span><ins>+ ASSERT(WebProcess::singleton().usesNetworkProcess());
+
</ins><span class="cx"> WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::unregisterBlobURL(const URL& url)
</span><span class="cx"> {
</span><ins>+ ASSERT(WebProcess::singleton().usesNetworkProcess());
+
</ins><span class="cx"> WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::UnregisterBlobURL(url), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end)
</span><span class="cx"> {
</span><ins>+ ASSERT(WebProcess::singleton().usesNetworkProcess());
+
</ins><span class="cx"> WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLForSlice(url, srcURL, start, end), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned long long BlobRegistryProxy::blobSize(const URL& url)
</span><span class="cx"> {
</span><ins>+ ASSERT(WebProcess::singleton().usesNetworkProcess());
+
</ins><span class="cx"> uint64_t resultSize;
</span><span class="cx"> if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::BlobSize(url), Messages::NetworkConnectionToWebProcess::BlobSize::Reply(resultSize), 0))
</span><span class="cx"> return 0;
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -109,54 +109,101 @@
</span><span class="cx">
</span><span class="cx"> String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
</span><span class="cx"> {
</span><del>- String result;
- if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesForDOM(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(result), 0))
- return String();
- return result;
</del><ins>+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess()) {
+ String result;
+ if (!webProcess.networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesForDOM(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(result), 0))
+ return String();
+ return result;
+ }
+
+ return WebCore::cookiesForDOM(session, firstParty, url);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
</span><span class="cx"> {
</span><del>- WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM(SessionTracker::sessionID(session), firstParty, url, cookieString), 0);
</del><ins>+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess()) {
+ webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM(SessionTracker::sessionID(session), firstParty, url, cookieString), 0);
+ return;
+ }
+
+ WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
</span><span class="cx"> {
</span><del>- bool result;
- if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesEnabled(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesEnabled::Reply(result), 0))
- return false;
- return result;
</del><ins>+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess()) {
+ bool result;
+ if (!webProcess.networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesEnabled(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesEnabled::Reply(result), 0))
+ return false;
+ return result;
+ }
+
+ return WebCore::cookiesEnabled(session, firstParty, url);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
</span><span class="cx"> {
</span><del>- String result;
- if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(result), 0))
- return String();
- return result;
</del><ins>+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess()) {
+ String result;
+ if (!webProcess.networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(result), 0))
+ return String();
+ return result;
+ }
+
+ return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
</span><span class="cx"> {
</span><del>- if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::GetRawCookies(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::GetRawCookies::Reply(rawCookies), 0))
- return false;
- return true;
</del><ins>+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess()) {
+ if (!webProcess.networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::GetRawCookies(SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::GetRawCookies::Reply(rawCookies), 0))
+ return false;
+ return true;
+ }
+
+ return WebCore::getRawCookies(session, firstParty, url, rawCookies);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
</span><span class="cx"> {
</span><del>- WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie(SessionTracker::sessionID(session), url, cookieName), 0);
</del><ins>+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess()) {
+ webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie(SessionTracker::sessionID(session), url, cookieName), 0);
+ return;
+ }
+
+ WebCore::deleteCookie(session, url, cookieName);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // LoaderStrategy
</span><span class="cx">
</span><span class="cx"> ResourceLoadScheduler* WebPlatformStrategies::resourceLoadScheduler()
</span><span class="cx"> {
</span><del>- return &WebProcess::singleton().webResourceLoadScheduler();
</del><ins>+ static ResourceLoadScheduler* scheduler;
+ if (!scheduler) {
+ auto& webProcess = WebProcess::singleton();
+ if (webProcess.usesNetworkProcess())
+ scheduler = &webProcess.webResourceLoadScheduler();
+ else
+ scheduler = WebCore::resourceLoadScheduler();
+ }
+
+ return scheduler;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::loadResourceSynchronously(NetworkingContext* context, unsigned long resourceLoadIdentifier, const ResourceRequest& request, StoredCredentials storedCredentials, ClientCredentialPolicy clientCredentialPolicy, ResourceError& error, ResourceResponse& response, Vector<char>& data)
</span><span class="cx"> {
</span><ins>+ auto& webProcess = WebProcess::singleton();
+ if (!webProcess.usesNetworkProcess()) {
+ LoaderStrategy::loadResourceSynchronously(context, resourceLoadIdentifier, request, storedCredentials, clientCredentialPolicy, error, response, data);
+ return;
+ }
+
</ins><span class="cx"> WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(context);
</span><span class="cx"> // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
</span><span class="cx"> // EmptyFrameLoaderClient shouldn't exist and everything should be using a WebFrameLoaderClient,
</span><span class="lines">@@ -180,7 +227,7 @@
</span><span class="cx">
</span><span class="cx"> HangDetectionDisabler hangDetectionDisabler;
</span><span class="cx">
</span><del>- if (!WebProcess::singleton().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
</del><ins>+ if (!webProcess.networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
</ins><span class="cx"> response = ResourceResponse();
</span><span class="cx"> error = internalError(request.url());
</span><span class="cx"> }
</span><span class="lines">@@ -193,6 +240,12 @@
</span><span class="cx"> if (!networkingContext)
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ auto& webProcess = WebProcess::singleton();
+ if (!webProcess.usesNetworkProcess()) {
+ LoaderStrategy::createPingHandle(networkingContext, request, shouldUseCredentialStorage);
+ return;
+ }
+
</ins><span class="cx"> WebFrameNetworkingContext* webContext = static_cast<WebFrameNetworkingContext*>(networkingContext);
</span><span class="cx"> WebFrameLoaderClient* webFrameLoaderClient = webContext->webFrameLoaderClient();
</span><span class="cx"> WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : nullptr;
</span><span class="lines">@@ -204,12 +257,14 @@
</span><span class="cx"> loadParameters.allowStoredCredentials = shouldUseCredentialStorage ? AllowStoredCredentials : DoNotAllowStoredCredentials;
</span><span class="cx"> loadParameters.shouldClearReferrerOnHTTPSToHTTPRedirect = networkingContext->shouldClearReferrerOnHTTPSToHTTPRedirect();
</span><span class="cx">
</span><del>- WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::LoadPing(loadParameters), 0);
</del><ins>+ webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::LoadPing(loadParameters), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> BlobRegistry* WebPlatformStrategies::createBlobRegistry()
</span><span class="cx"> {
</span><del>- return new BlobRegistryProxy;
</del><ins>+ if (!WebProcess::singleton().usesNetworkProcess())
+ return LoaderStrategy::createBlobRegistry();
+ return new BlobRegistryProxy;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // PluginStrategy
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcessWebPageWebFramecpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -254,8 +254,21 @@
</span><span class="cx"> m_policyDownloadID = 0;
</span><span class="cx">
</span><span class="cx"> auto& webProcess = WebProcess::singleton();
</span><ins>+#if USE(NETWORK_SESSION)
+ ASSERT(webProcess.usesNetworkProcess());
+#endif
</ins><span class="cx"> SessionID sessionID = page() ? page()->sessionID() : SessionID::defaultSessionID();
</span><del>- webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::StartDownload(sessionID, policyDownloadID, request), 0);
</del><ins>+ if (webProcess.usesNetworkProcess()) {
+ webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::StartDownload(sessionID, policyDownloadID, request), 0);
+ return;
+ }
+
+#if USE(NETWORK_SESSION)
+ // Using NETWORK_SESSION requires the use of a network process.
+ RELEASE_ASSERT_NOT_REACHED();
+#else
+ webProcess.downloadManager().startDownload(sessionID, policyDownloadID, request);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebFrame::convertMainResourceLoadToDownload(DocumentLoader* documentLoader, SessionID sessionID, const ResourceRequest& request, const ResourceResponse& response)
</span><span class="lines">@@ -268,16 +281,37 @@
</span><span class="cx"> SubresourceLoader* mainResourceLoader = documentLoader->mainResourceLoader();
</span><span class="cx">
</span><span class="cx"> auto& webProcess = WebProcess::singleton();
</span><del>- // Use 0 to indicate that the resource load can't be converted and a new download must be started.
- // This can happen if there is no loader because the main resource is in the WebCore memory cache,
- // or because the conversion was attempted when not calling SubresourceLoader::didReceiveResponse().
- uint64_t mainResourceLoadIdentifier;
- if (mainResourceLoader)
- mainResourceLoadIdentifier = mainResourceLoader->identifier();
- else
- mainResourceLoadIdentifier = 0;
</del><ins>+#if USE(NETWORK_SESSION)
+ ASSERT(webProcess.usesNetworkProcess());
+#endif
+ if (webProcess.usesNetworkProcess()) {
+ // Use 0 to indicate that the resource load can't be converted and a new download must be started.
+ // This can happen if there is no loader because the main resource is in the WebCore memory cache,
+ // or because the conversion was attempted when not calling SubresourceLoader::didReceiveResponse().
+ uint64_t mainResourceLoadIdentifier;
+ if (mainResourceLoader)
+ mainResourceLoadIdentifier = mainResourceLoader->identifier();
+ else
+ mainResourceLoadIdentifier = 0;
</ins><span class="cx">
</span><del>- webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::ConvertMainResourceLoadToDownload(sessionID, mainResourceLoadIdentifier, policyDownloadID, request, response), 0);
</del><ins>+ webProcess.networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::ConvertMainResourceLoadToDownload(sessionID, mainResourceLoadIdentifier, policyDownloadID, request, response), 0);
+ return;
+ }
+
+ if (!mainResourceLoader) {
+ // The main resource has already been loaded. Start a new download instead.
+#if !USE(NETWORK_SESSION)
+ webProcess.downloadManager().startDownload(sessionID, policyDownloadID, request);
+#endif
+ return;
+ }
+
+#if USE(NETWORK_SESSION)
+ // Using NETWORK_SESSION requires the use of a network process.
+ RELEASE_ASSERT_NOT_REACHED();
+#else
+ webProcess.downloadManager().convertHandleToDownload(policyDownloadID, documentLoader->mainResourceLoader()->handle(), request, response);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String WebFrame::source() const
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "APIPageHandle.h"
</span><span class="cx"> #include "AuthenticationManager.h"
</span><span class="cx"> #include "ChildProcessMessages.h"
</span><ins>+#include "CustomProtocolManager.h"
</ins><span class="cx"> #include "DrawingArea.h"
</span><span class="cx"> #include "EventDispatcher.h"
</span><span class="cx"> #include "InjectedBundle.h"
</span><span class="lines">@@ -155,6 +156,7 @@
</span><span class="cx"> , m_fullKeyboardAccessEnabled(false)
</span><span class="cx"> , m_textCheckerState()
</span><span class="cx"> , m_iconDatabaseProxy(new WebIconDatabaseProxy(this))
</span><ins>+ , m_usesNetworkProcess(false)
</ins><span class="cx"> , m_webResourceLoadScheduler(new WebResourceLoadScheduler)
</span><span class="cx"> , m_dnsPrefetchHystereris([this](HysteresisState state) { if (state == HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); })
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="lines">@@ -185,6 +187,7 @@
</span><span class="cx"> #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
</span><span class="cx"> addSupplement<WebNotificationManager>();
</span><span class="cx"> #endif
</span><ins>+ addSupplement<CustomProtocolManager>();
</ins><span class="cx"> #if ENABLE(BATTERY_STATUS)
</span><span class="cx"> addSupplement<WebBatteryManager>();
</span><span class="cx"> #endif
</span><span class="lines">@@ -242,10 +245,32 @@
</span><span class="cx"> connection->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebProcess::didCreateDownload()
+{
+ disableTermination();
+}
+
+void WebProcess::didDestroyDownload()
+{
+ enableTermination();
+}
+
+IPC::Connection* WebProcess::downloadProxyConnection()
+{
+ return parentProcessConnection();
+}
+
+AuthenticationManager& WebProcess::downloadsAuthenticationManager()
+{
+ return *supplement<AuthenticationManager>();
+}
+
</ins><span class="cx"> void WebProcess::initializeWebProcess(WebProcessCreationParameters&& parameters)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_pageMap.isEmpty());
</span><span class="cx">
</span><ins>+ m_usesNetworkProcess = parameters.usesNetworkProcess;
+
</ins><span class="cx"> #if OS(LINUX)
</span><span class="cx"> WebCore::MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
</span><span class="cx"> #endif
</span><span class="lines">@@ -327,7 +352,8 @@
</span><span class="cx"> ensureNetworkProcessConnection();
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- CookieStorageShim::singleton().initialize();
</del><ins>+ if (usesNetworkProcess())
+ CookieStorageShim::singleton().initialize();
</ins><span class="cx"> #endif
</span><span class="cx"> setTerminationTimeout(parameters.terminationTimeout);
</span><span class="cx">
</span><span class="lines">@@ -361,6 +387,9 @@
</span><span class="cx">
</span><span class="cx"> void WebProcess::ensureNetworkProcessConnection()
</span><span class="cx"> {
</span><ins>+ if (!m_usesNetworkProcess)
+ return;
+
</ins><span class="cx"> if (m_networkProcessConnection)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -469,6 +498,14 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+DownloadManager& WebProcess::downloadManager()
+{
+ ASSERT(!usesNetworkProcess());
+
+ static NeverDestroyed<DownloadManager> downloadManager(this);
+ return downloadManager;
+}
+
</ins><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> PluginProcessConnectionManager& WebProcess::pluginProcessConnectionManager()
</span><span class="cx"> {
</span><span class="lines">@@ -531,6 +568,7 @@
</span><span class="cx"> bool WebProcess::shouldTerminate()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_pageMap.isEmpty());
</span><ins>+ ASSERT(usesNetworkProcess() || !downloadManager().isDownloading());
</ins><span class="cx">
</span><span class="cx"> // FIXME: the ShouldTerminate message should also send termination parameters, such as any session cookies that need to be preserved.
</span><span class="cx"> bool shouldTerminate = false;
</span><span class="lines">@@ -979,8 +1017,15 @@
</span><span class="cx"> injectedBundle->setBundleParameters(value);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool WebProcess::usesNetworkProcess() const
+{
+ return m_usesNetworkProcess;
+}
+
</ins><span class="cx"> NetworkProcessConnection* WebProcess::networkConnection()
</span><span class="cx"> {
</span><ins>+ ASSERT(m_usesNetworkProcess);
+
</ins><span class="cx"> // If we've lost our connection to the network process (e.g. it crashed) try to re-establish it.
</span><span class="cx"> if (!m_networkProcessConnection)
</span><span class="cx"> ensureNetworkProcessConnection();
</span><span class="lines">@@ -1049,6 +1094,27 @@
</span><span class="cx">
</span><span class="cx"> #endif // ENABLED(DATABASE_PROCESS)
</span><span class="cx">
</span><ins>+void WebProcess::downloadRequest(SessionID sessionID, uint64_t downloadID, uint64_t initiatingPageID, const ResourceRequest& request)
+{
+ WebPage* initiatingPage = initiatingPageID ? webPage(initiatingPageID) : 0;
+
+ ResourceRequest requestWithOriginalURL = request;
+ if (initiatingPage)
+ initiatingPage->mainFrame()->loader().setOriginalURLForDownloadRequest(requestWithOriginalURL);
+
+ downloadManager().startDownload(sessionID, downloadID, requestWithOriginalURL);
+}
+
+void WebProcess::resumeDownload(uint64_t downloadID, const IPC::DataReference& resumeData, const String& path, const WebKit::SandboxExtension::Handle& sandboxExtensionHandle)
+{
+ downloadManager().resumeDownload(downloadID, resumeData, path, sandboxExtensionHandle);
+}
+
+void WebProcess::cancelDownload(uint64_t downloadID)
+{
+ downloadManager().cancelDownload(downloadID);
+}
+
</ins><span class="cx"> void WebProcess::setEnhancedAccessibility(bool flag)
</span><span class="cx"> {
</span><span class="cx"> WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility(flag);
</span><span class="lines">@@ -1390,12 +1456,16 @@
</span><span class="cx"> if (hostname.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_dnsPrefetchedHosts.add(hostname).isNewEntry)
- networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::PrefetchDNS(hostname), 0);
- // The DNS prefetched hosts cache is only to avoid asking for the same hosts too many times
- // in a very short period of time, producing a lot of IPC traffic. So we clear this cache after
- // some time of no DNS requests.
- m_dnsPrefetchHystereris.impulse();
</del><ins>+ if (usesNetworkProcess()) {
+ if (m_dnsPrefetchedHosts.add(hostname).isNewEntry)
+ networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::PrefetchDNS(hostname), 0);
+ // The DNS prefetched hosts cache is only to avoid asking for the same hosts too many times
+ // in a very short period of time, producing a lot of IPC traffic. So we clear this cache after
+ // some time of no DNS requests.
+ m_dnsPrefetchHystereris.impulse();
+ return;
+ }
+ WebCore::prefetchDNS(hostname);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.h (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.h        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.h        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "CacheModel.h"
</span><span class="cx"> #include "ChildProcess.h"
</span><ins>+#include "DownloadManager.h"
</ins><span class="cx"> #include "DrawingArea.h"
</span><span class="cx"> #include "PluginProcessConnectionManager.h"
</span><span class="cx"> #include "ResourceCachesToClear.h"
</span><span class="lines">@@ -70,6 +71,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class DownloadManager;
</ins><span class="cx"> class EventDispatcher;
</span><span class="cx"> class InjectedBundle;
</span><span class="cx"> class NetworkProcessConnection;
</span><span class="lines">@@ -91,7 +93,8 @@
</span><span class="cx"> class WebToDatabaseProcessConnection;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-class WebProcess : public ChildProcess {
</del><ins>+class WebProcess : public ChildProcess, private DownloadManager::Client {
+ friend class NeverDestroyed<DownloadManager>;
</ins><span class="cx"> public:
</span><span class="cx"> static WebProcess& singleton();
</span><span class="cx">
</span><span class="lines">@@ -141,6 +144,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> const TextCheckerState& textCheckerState() const { return m_textCheckerState; }
</span><ins>+ DownloadManager& downloadManager();
</ins><span class="cx">
</span><span class="cx"> void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
</span><span class="cx">
</span><span class="lines">@@ -150,6 +154,8 @@
</span><span class="cx">
</span><span class="cx"> EventDispatcher& eventDispatcher() { return *m_eventDispatcher; }
</span><span class="cx">
</span><ins>+ bool usesNetworkProcess() const;
+
</ins><span class="cx"> NetworkProcessConnection* networkConnection();
</span><span class="cx"> void networkProcessConnectionClosed(NetworkProcessConnection*);
</span><span class="cx"> WebResourceLoadScheduler& webResourceLoadScheduler();
</span><span class="lines">@@ -175,6 +181,10 @@
</span><span class="cx">
</span><span class="cx"> void updateActivePages();
</span><span class="cx">
</span><ins>+#if USE(SOUP)
+ void allowSpecificHTTPSCertificateForHost(const WebCore::CertificateInfo&, const String& host);
+#endif
+
</ins><span class="cx"> void processWillSuspendImminently(bool& handled);
</span><span class="cx"> void prepareToSuspend();
</span><span class="cx"> void cancelPrepareToSuspend();
</span><span class="lines">@@ -207,6 +217,12 @@
</span><span class="cx"> WebProcess();
</span><span class="cx"> ~WebProcess();
</span><span class="cx">
</span><ins>+ // DownloadManager::Client.
+ virtual void didCreateDownload() override;
+ virtual void didDestroyDownload() override;
+ virtual IPC::Connection* downloadProxyConnection() override;
+ virtual AuthenticationManager& downloadsAuthenticationManager() override;
+
</ins><span class="cx"> void initializeWebProcess(WebProcessCreationParameters&&);
</span><span class="cx"> void platformInitializeWebProcess(WebProcessCreationParameters&&);
</span><span class="cx">
</span><span class="lines">@@ -242,6 +258,10 @@
</span><span class="cx"> void startMemorySampler(const SandboxExtension::Handle&, const String&, const double);
</span><span class="cx"> void stopMemorySampler();
</span><span class="cx">
</span><ins>+ void downloadRequest(WebCore::SessionID, uint64_t downloadID, uint64_t initiatingPageID, const WebCore::ResourceRequest&);
+ void resumeDownload(uint64_t downloadID, const IPC::DataReference& resumeData, const String& path, const SandboxExtension::Handle&);
+ void cancelDownload(uint64_t downloadID);
+
</ins><span class="cx"> void setTextCheckerState(const TextCheckerState&);
</span><span class="cx">
</span><span class="cx"> void getWebCoreStatistics(uint64_t callbackID);
</span><span class="lines">@@ -256,6 +276,10 @@
</span><span class="cx"> void deleteWebsiteData(WebCore::SessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
</span><span class="cx"> void deleteWebsiteDataForOrigins(WebCore::SessionID, uint64_t websiteDataTypes, const Vector<WebCore::SecurityOriginData>& origins, uint64_t callbackID);
</span><span class="cx">
</span><ins>+#if USE(SOUP)
+ void setIgnoreTLSErrors(bool);
+#endif
+
</ins><span class="cx"> void setMemoryCacheDisabled(bool);
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="lines">@@ -334,6 +358,7 @@
</span><span class="cx">
</span><span class="cx"> void ensureNetworkProcessConnection();
</span><span class="cx"> RefPtr<NetworkProcessConnection> m_networkProcessConnection;
</span><ins>+ bool m_usesNetworkProcess;
</ins><span class="cx"> WebResourceLoadScheduler* m_webResourceLoadScheduler;
</span><span class="cx"> HashSet<String> m_dnsPrefetchedHosts;
</span><span class="cx"> WebCore::HysteresisActivity m_dnsPrefetchHystereris;
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcessWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.messages.in (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.messages.in        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/WebProcess.messages.in        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -44,6 +44,9 @@
</span><span class="cx"> SetShouldUseFontSmoothing(bool useFontSmoothing)
</span><span class="cx"> UserPreferredLanguagesChanged(Vector<String> languages)
</span><span class="cx"> FullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
</span><ins>+#if USE(SOUP)
+ SetIgnoreTLSErrors(bool ignoreTLSErrors)
+#endif
</ins><span class="cx">
</span><span class="cx"> // Legacy private browsing session is per process. Individual pages or page groups may use the private session or the default one as appropriate.
</span><span class="cx"> EnsurePrivateBrowsingSession(WebCore::SessionID sessionID)
</span><span class="lines">@@ -59,6 +62,12 @@
</span><span class="cx"> void StartMemorySampler(WebKit::SandboxExtension::Handle sampleLogFileHandle, String sampleLogFilePath, double interval);
</span><span class="cx"> void StopMemorySampler();
</span><span class="cx">
</span><ins>+ # Downloads. This should really be in a Download.messages.in, but it seemed unnecessary to create a new file just for
+ # three messages.
+ DownloadRequest(WebCore::SessionID sessionID, uint64_t downloadID, uint64_t initiatingPageID, WebCore::ResourceRequest request)
+ ResumeDownload(uint64_t downloadID, IPC::DataReference resumeData, String path, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
+ CancelDownload(uint64_t downloadID)
+
</ins><span class="cx"> SetTextCheckerState(struct WebKit::TextCheckerState textCheckerState)
</span><span class="cx">
</span><span class="cx"> SetEnhancedAccessibility(bool flag)
</span><span class="lines">@@ -82,6 +91,10 @@
</span><span class="cx"> SetQOS(int latencyQOS, int throughputQOS)
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(SOUP)
+ AllowSpecificHTTPSCertificateForHost(WebCore::CertificateInfo certificate, String host)
+#endif
+
</ins><span class="cx"> SetMemoryCacheDisabled(bool disabled);
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span></span></pre></div>
<a id="tagsSafari6021131SourceWebKit2WebProcesssoupWebProcessSoupcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -49,6 +49,18 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+static uint64_t getCacheDiskFreeSize(SoupCache* cache)
+{
+ ASSERT(cache);
+
+ GUniqueOutPtr<char> cacheDir;
+ g_object_get(G_OBJECT(cache), "cache-dir", &cacheDir.outPtr(), NULL);
+ if (!cacheDir)
+ return 0;
+
+ return WebCore::getVolumeFreeSizeForPath(cacheDir.get());
+}
+
</ins><span class="cx"> void WebProcess::platformSetCacheModel(CacheModel cacheModel)
</span><span class="cx"> {
</span><span class="cx"> unsigned cacheTotalCapacity = 0;
</span><span class="lines">@@ -61,7 +73,13 @@
</span><span class="cx"> unsigned long urlCacheDiskCapacity = 0;
</span><span class="cx">
</span><span class="cx"> uint64_t diskFreeSize = 0;
</span><ins>+ SoupCache* cache = nullptr;
</ins><span class="cx">
</span><ins>+ if (!usesNetworkProcess()) {
+ cache = WebCore::SoupNetworkSession::defaultSession().cache();
+ diskFreeSize = getCacheDiskFreeSize(cache) / WTF::MB;
+ }
+
</ins><span class="cx"> uint64_t memSize = WTF::ramSize() / WTF::MB;
</span><span class="cx"> calculateCacheSizes(cacheModel, memSize, diskFreeSize,
</span><span class="cx"> cacheTotalCapacity, cacheMinDeadCapacity, cacheMaxDeadCapacity, deadDecodedDataDeletionInterval,
</span><span class="lines">@@ -76,12 +94,35 @@
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> WebCore::PageCache::singleton().setShouldClearBackingStores(true);
</span><span class="cx"> #endif
</span><ins>+
+ if (!usesNetworkProcess()) {
+ if (urlCacheDiskCapacity > soup_cache_get_max_size(cache))
+ soup_cache_set_max_size(cache, urlCacheDiskCapacity);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcess::platformClearResourceCaches(ResourceCachesToClear cachesToClear)
</span><span class="cx"> {
</span><ins>+ if (cachesToClear == InMemoryResourceCachesOnly)
+ return;
+
+ // If we're using the network process then it is the only one that needs to clear the disk cache.
+ if (usesNetworkProcess())
+ return;
+
+ soup_cache_clear(WebCore::SoupNetworkSession::defaultSession().cache());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static void setSoupSessionAcceptLanguage(const Vector<String>& languages)
+{
+ WebCore::SoupNetworkSession::defaultSession().setAcceptLanguages(languages);
+}
+
+static void languageChanged(void*)
+{
+ setSoupSessionAcceptLanguage(WebCore::userPreferredLanguages());
+}
+
</ins><span class="cx"> void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters&& parameters)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(SECCOMP_FILTERS)
</span><span class="lines">@@ -94,10 +135,62 @@
</span><span class="cx"> seccompFilters.initialize();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><ins>+
+ if (usesNetworkProcess())
+ return;
+
+ ASSERT(!parameters.diskCacheDirectory.isEmpty());
+
+ // We used to use the given cache directory for the soup cache, but now we use a subdirectory to avoid
+ // conflicts with other cache files in the same directory. Remove the old cache files if they still exist.
+ WebCore::SoupNetworkSession::defaultSession().clearCache(WebCore::directoryName(parameters.diskCacheDirectory));
+
+#if ENABLE(NETWORK_CACHE)
+ // When network cache is enabled, the disk cache directory is the network process one.
+ CString diskCachePath = WebCore::pathByAppendingComponent(WebCore::directoryName(parameters.diskCacheDirectory), "webkit").utf8();
+#else
+ CString diskCachePath = parameters.diskCacheDirectory.utf8();
+#endif
+
+ GRefPtr<SoupCache> soupCache = adoptGRef(soup_cache_new(diskCachePath.data(), SOUP_CACHE_SINGLE_USER));
+ WebCore::SoupNetworkSession::defaultSession().setCache(soupCache.get());
+ // Set an initial huge max_size for the SoupCache so the call to soup_cache_load() won't evict any cached
+ // resource. The final size of the cache will be set by NetworkProcess::platformSetCacheModel().
+ unsigned initialMaxSize = soup_cache_get_max_size(soupCache.get());
+ soup_cache_set_max_size(soupCache.get(), G_MAXUINT);
+ soup_cache_load(soupCache.get());
+ soup_cache_set_max_size(soupCache.get(), initialMaxSize);
+
+ if (!parameters.cookiePersistentStoragePath.isEmpty()) {
+ supplement<WebCookieManager>()->setCookiePersistentStorage(parameters.cookiePersistentStoragePath,
+ parameters.cookiePersistentStorageType);
+ }
+ supplement<WebCookieManager>()->setHTTPCookieAcceptPolicy(parameters.cookieAcceptPolicy);
+
+ if (!parameters.languages.isEmpty())
+ setSoupSessionAcceptLanguage(parameters.languages);
+
+ setIgnoreTLSErrors(parameters.ignoreTLSErrors);
+
+ WebCore::addLanguageChangeObserver(this, languageChanged);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcess::platformTerminate()
</span><span class="cx"> {
</span><ins>+ if (!usesNetworkProcess())
+ WebCore::removeLanguageChangeObserver(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebProcess::setIgnoreTLSErrors(bool ignoreTLSErrors)
+{
+ ASSERT(!usesNetworkProcess());
+ WebCore::ResourceHandle::setIgnoreSSLErrors(ignoreTLSErrors);
+}
+
+void WebProcess::allowSpecificHTTPSCertificateForHost(const WebCore::CertificateInfo& certificateInfo, const String& host)
+{
+ ASSERT(!usesNetworkProcess());
+ WebCore::ResourceHandle::setClientCertificate(host, certificateInfo.certificate());
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari6021131ToolsChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Tools/ChangeLog (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Tools/ChangeLog        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Tools/ChangeLog        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2015-12-06 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><ins>+ Roll out r192796.
+
+2015-12-06 Babak Shafiei <bshafiei@apple.com>
+
</ins><span class="cx"> Roll out r192808.
</span><span class="cx">
</span><span class="cx"> 2015-12-01 Commit Queue <commit-queue@webkit.org>
</span></span></pre></div>
<a id="tagsSafari6021131ToolsTestWebKitAPITestsWebKit2Geolocationcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/Geolocation.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/Geolocation.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/Geolocation.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -250,6 +250,7 @@
</span><span class="cx"> TEST(WebKit2, GeolocationTransitionToHighAccuracy)
</span><span class="cx"> {
</span><span class="cx"> WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
</span><ins>+ WKContextSetUsesNetworkProcess(context.get(), true);
</ins><span class="cx">
</span><span class="cx"> GeolocationTransitionToHighAccuracyStateTracker stateTracker;
</span><span class="cx"> setupGeolocationProvider(context.get(), &stateTracker);
</span></span></pre></div>
<a id="tagsSafari6021131ToolsTestWebKitAPITestsWebKit2macGetPIDAfterAbortedProcessLaunchcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> TEST(WebKit2, GetPIDAfterAbortedProcessLaunch)
</span><span class="cx"> {
</span><span class="cx"> WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
</span><ins>+ WKContextSetUsesNetworkProcess(context.get(), true);
</ins><span class="cx">
</span><span class="cx"> PlatformWebView webView(context.get());
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari6021131ToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-602.1.13.1/Tools/WebKitTestRunner/TestController.cpp (193596 => 193597)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-602.1.13.1/Tools/WebKitTestRunner/TestController.cpp        2015-12-06 22:23:40 UTC (rev 193596)
+++ tags/Safari-602.1.13.1/Tools/WebKitTestRunner/TestController.cpp        2015-12-06 22:25:08 UTC (rev 193597)
</span><span class="lines">@@ -404,6 +404,7 @@
</span><span class="cx"> m_geolocationProvider = std::make_unique<GeolocationProviderMock>(m_context.get());
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(EFL)
</span><ins>+ WKContextSetUsesNetworkProcess(m_context.get(), false);
</ins><span class="cx"> WKContextSetProcessModel(m_context.get(), kWKProcessModelSharedSecondaryProcess);
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>