<!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>[201603] trunk/Source</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/201603">201603</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-06-02 11:17:47 -0700 (Thu, 02 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Overhaul cross-thread use of ResourceRequest, ResourceResponse, and ResourceError.
https://bugs.webkit.org/show_bug.cgi?id=158293

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Refactor, no behavior change).

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromSessionCaches):

* platform/network/ResourceErrorBase.cpp:
(WebCore::ResourceErrorBase::isolatedCopy):
(WebCore::ResourceErrorBase::copy): Deleted.
* platform/network/ResourceErrorBase.h:

* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::isolatedCopy):
(WebCore::ResourceRequestBase::setAsIsolatedCopy):
(WebCore::ResourceRequestBase::adopt): Deleted.

Made copyData private, and made &quot;adopt&quot; be &quot;isolatedCopy&quot;.
Rest of the changes are all re-indenting the file.
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::responseContentDispositionEncodingFallbackArray):
(WebCore::ResourceRequestBase::reportUploadProgress):
(WebCore::ResourceRequestBase::setReportUploadProgress):
(WebCore::ResourceRequestBase::reportLoadTiming):
(WebCore::ResourceRequestBase::setReportLoadTiming):
(WebCore::ResourceRequestBase::reportRawHeaders):
(WebCore::ResourceRequestBase::setReportRawHeaders):
(WebCore::ResourceRequestBase::hiddenFromInspector):
(WebCore::ResourceRequestBase::setHiddenFromInspector):
(WebCore::ResourceRequestBase::requester):
(WebCore::ResourceRequestBase::setRequester):
(WebCore::ResourceRequestBase::encodingRequiresPlatformData):
(WebCore::ResourceRequestBase::ResourceRequestBase):
(WebCore::ResourceRequestBase::platformCompare):
(WebCore::operator==):
(WebCore::operator!=):

* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::isolatedCopy):
(WebCore::ResourceResponseBase::adopt): Deleted.
* platform/network/ResourceResponseBase.h:

* platform/network/cf/ResourceError.h:
(WebCore::ResourceError::isolatedCopy): Deleted.

Removed platform-specific isolatedCopy, and re-indented the header:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::encodingRequiresPlatformData):
(WebCore::ResourceRequest::cachePartition):
(WebCore::ResourceRequest::setCachePartition):
(WebCore::ResourceRequest::setDomainForCachePartition):
(WebCore::ResourceRequest::resourcePrioritiesEnabled):
(WebCore::ResourceRequest::isolatedCopy): Deleted.

* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::isolatedCopy): Deleted.

Source/WebKit2:

* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::Entry):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderWorkerThreadableLoadercpp">trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCachecpp">trunk/Source/WebCore/loader/cache/MemoryCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceErrorBasecpp">trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceErrorBaseh">trunk/Source/WebCore/platform/network/ResourceErrorBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBasecpp">trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBaseh">trunk/Source/WebCore/platform/network/ResourceRequestBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBasecpp">trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceResponseBaseh">trunk/Source/WebCore/platform/network/ResourceResponseBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceErrorh">trunk/Source/WebCore/platform/network/cf/ResourceError.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequesth">trunk/Source/WebCore/platform/network/cf/ResourceRequest.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseh">trunk/Source/WebCore/platform/network/cf/ResourceResponse.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscacheNetworkCacheEntrycpp">trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/ChangeLog        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2016-06-02  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Overhaul cross-thread use of ResourceRequest, ResourceResponse, and ResourceError.
+        https://bugs.webkit.org/show_bug.cgi?id=158293
+
+        Reviewed by Darin Adler.
+
+        No new tests (Refactor, no behavior change).
+
+        * loader/WorkerThreadableLoader.cpp:
+        (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
+        (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
+        (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
+        (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
+
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::removeRequestFromSessionCaches):
+
+        * platform/network/ResourceErrorBase.cpp:
+        (WebCore::ResourceErrorBase::isolatedCopy):
+        (WebCore::ResourceErrorBase::copy): Deleted.
+        * platform/network/ResourceErrorBase.h:
+
+        * platform/network/ResourceRequestBase.cpp:
+        (WebCore::ResourceRequestBase::isolatedCopy):
+        (WebCore::ResourceRequestBase::setAsIsolatedCopy):
+        (WebCore::ResourceRequestBase::adopt): Deleted.
+        
+        Made copyData private, and made &quot;adopt&quot; be &quot;isolatedCopy&quot;.
+        Rest of the changes are all re-indenting the file.
+        * platform/network/ResourceRequestBase.h:
+        (WebCore::ResourceRequestBase::responseContentDispositionEncodingFallbackArray):
+        (WebCore::ResourceRequestBase::reportUploadProgress):
+        (WebCore::ResourceRequestBase::setReportUploadProgress):
+        (WebCore::ResourceRequestBase::reportLoadTiming):
+        (WebCore::ResourceRequestBase::setReportLoadTiming):
+        (WebCore::ResourceRequestBase::reportRawHeaders):
+        (WebCore::ResourceRequestBase::setReportRawHeaders):
+        (WebCore::ResourceRequestBase::hiddenFromInspector):
+        (WebCore::ResourceRequestBase::setHiddenFromInspector):
+        (WebCore::ResourceRequestBase::requester):
+        (WebCore::ResourceRequestBase::setRequester):
+        (WebCore::ResourceRequestBase::encodingRequiresPlatformData):
+        (WebCore::ResourceRequestBase::ResourceRequestBase):
+        (WebCore::ResourceRequestBase::platformCompare):
+        (WebCore::operator==):
+        (WebCore::operator!=):
+
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::ResourceResponseBase::isolatedCopy):
+        (WebCore::ResourceResponseBase::adopt): Deleted.
+        * platform/network/ResourceResponseBase.h:
+
+        * platform/network/cf/ResourceError.h:
+        (WebCore::ResourceError::isolatedCopy): Deleted.
+
+        Removed platform-specific isolatedCopy, and re-indented the header:
+        * platform/network/cf/ResourceRequest.h:
+        (WebCore::ResourceRequest::ResourceRequest):
+        (WebCore::ResourceRequest::encodingRequiresPlatformData):
+        (WebCore::ResourceRequest::cachePartition):
+        (WebCore::ResourceRequest::setCachePartition):
+        (WebCore::ResourceRequest::setDomainForCachePartition):
+        (WebCore::ResourceRequest::resourcePrioritiesEnabled):
+        (WebCore::ResourceRequest::isolatedCopy): Deleted.
+
+        * platform/network/cf/ResourceResponse.h:
+        (WebCore::ResourceResponse::isolatedCopy): Deleted.
+
</ins><span class="cx"> 2016-06-02  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Modernize various lambda captures
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderWorkerThreadableLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -96,17 +96,16 @@
</span><span class="cx">     auto contentSecurityPolicyCopy = std::make_unique&lt;ContentSecurityPolicy&gt;(*securityOrigin);
</span><span class="cx">     contentSecurityPolicyCopy-&gt;copyStateFrom(contentSecurityPolicy);
</span><span class="cx"> 
</span><del>-    m_loaderProxy.postTaskToLoader([this, requestData = request.copyData(), options = options.isolatedCopy(), contentSecurityPolicyCopy = WTFMove(contentSecurityPolicyCopy), outgoingReferrer = outgoingReferrer.isolatedCopy()](ScriptExecutionContext&amp; context) mutable {
</del><ins>+    m_loaderProxy.postTaskToLoader([this, request = request.isolatedCopy(), options = options.isolatedCopy(), contentSecurityPolicyCopy = WTFMove(contentSecurityPolicyCopy), outgoingReferrer = outgoingReferrer.isolatedCopy()](ScriptExecutionContext&amp; context) mutable {
</ins><span class="cx">         ASSERT(isMainThread());
</span><span class="cx">         Document&amp; document = downcast&lt;Document&gt;(context);
</span><span class="cx"> 
</span><del>-        auto request = ResourceRequest::adopt(WTFMove(requestData));
-        request-&gt;setHTTPReferrer(outgoingReferrer);
</del><ins>+        request.setHTTPReferrer(outgoingReferrer);
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: If the a site requests a local resource, then this will return a non-zero value but the sync path
</span><span class="cx">         // will return a 0 value. Either this should return 0 or the other code path should do a callback with
</span><span class="cx">         // a failure.
</span><del>-        m_mainThreadLoader = DocumentThreadableLoader::create(document, *this, *request, *options, WTFMove(contentSecurityPolicyCopy));
</del><ins>+        m_mainThreadLoader = DocumentThreadableLoader::create(document, *this, request, *options, WTFMove(contentSecurityPolicyCopy));
</ins><span class="cx">         ASSERT(m_mainThreadLoader || m_loadingFinished);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -163,10 +162,9 @@
</span><span class="cx"> void WorkerThreadableLoader::MainThreadBridge::didReceiveResponse(unsigned long identifier, const ResourceResponse&amp; response)
</span><span class="cx"> {
</span><span class="cx">     Ref&lt;ThreadableLoaderClientWrapper&gt; protectedWorkerClientWrapper = *m_workerClientWrapper;
</span><del>-    m_loaderProxy.postTaskForModeToWorkerGlobalScope([protectedWorkerClientWrapper = WTFMove(protectedWorkerClientWrapper), identifier, responseData = response.copyData()] (ScriptExecutionContext&amp; context) mutable {
</del><ins>+    m_loaderProxy.postTaskForModeToWorkerGlobalScope([protectedWorkerClientWrapper = WTFMove(protectedWorkerClientWrapper), identifier, response = response.isolatedCopy()] (ScriptExecutionContext&amp; context) mutable {
</ins><span class="cx">         ASSERT_UNUSED(context, context.isWorkerGlobalScope());
</span><del>-        auto response(ResourceResponse::adopt(WTFMove(responseData)));
-        protectedWorkerClientWrapper-&gt;didReceiveResponse(identifier, *response);
</del><ins>+        protectedWorkerClientWrapper-&gt;didReceiveResponse(identifier, response);
</ins><span class="cx">     }, m_taskMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -194,20 +192,18 @@
</span><span class="cx"> void WorkerThreadableLoader::MainThreadBridge::didFail(const ResourceError&amp; error)
</span><span class="cx"> {
</span><span class="cx">     m_loadingFinished = true;
</span><del>-    Ref&lt;ThreadableLoaderClientWrapper&gt; protectedWorkerClientWrapper = *m_workerClientWrapper;
-    m_loaderProxy.postTaskForModeToWorkerGlobalScope([protectedWorkerClientWrapper = WTFMove(protectedWorkerClientWrapper), error = error.copy()] (ScriptExecutionContext&amp; context) mutable {
</del><ins>+    m_loaderProxy.postTaskForModeToWorkerGlobalScope([workerClientWrapper = Ref&lt;ThreadableLoaderClientWrapper&gt;(*m_workerClientWrapper), error = error.isolatedCopy()] (ScriptExecutionContext&amp; context) mutable {
</ins><span class="cx">         ASSERT_UNUSED(context, context.isWorkerGlobalScope());
</span><del>-        protectedWorkerClientWrapper-&gt;didFail(error);
</del><ins>+        workerClientWrapper-&gt;didFail(error);
</ins><span class="cx">     }, m_taskMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck(const ResourceError&amp; error)
</span><span class="cx"> {
</span><span class="cx">     m_loadingFinished = true;
</span><del>-    Ref&lt;ThreadableLoaderClientWrapper&gt; protectedWorkerClientWrapper = *m_workerClientWrapper;
-    m_loaderProxy.postTaskForModeToWorkerGlobalScope([protectedWorkerClientWrapper = WTFMove(protectedWorkerClientWrapper), error = error.copy()] (ScriptExecutionContext&amp; context) mutable {
</del><ins>+    m_loaderProxy.postTaskForModeToWorkerGlobalScope([workerClientWrapper = Ref&lt;ThreadableLoaderClientWrapper&gt;(*m_workerClientWrapper), error = error.isolatedCopy()] (ScriptExecutionContext&amp; context) mutable {
</ins><span class="cx">         ASSERT_UNUSED(context, context.isWorkerGlobalScope());
</span><del>-        protectedWorkerClientWrapper-&gt;didFailAccessControlCheck(error);
</del><ins>+        workerClientWrapper-&gt;didFailAccessControlCheck(error);
</ins><span class="cx">     }, m_taskMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -655,10 +655,8 @@
</span><span class="cx"> void MemoryCache::removeRequestFromSessionCaches(ScriptExecutionContext&amp; context, const ResourceRequest&amp; request)
</span><span class="cx"> {
</span><span class="cx">     if (is&lt;WorkerGlobalScope&gt;(context)) {
</span><del>-        CrossThreadResourceRequestData* requestData = request.copyData().release();
-        downcast&lt;WorkerGlobalScope&gt;(context).thread().workerLoaderProxy().postTaskToLoader([requestData] (ScriptExecutionContext&amp; context) {
-            auto request(ResourceRequest::adopt(std::unique_ptr&lt;CrossThreadResourceRequestData&gt;(requestData)));
-            MemoryCache::removeRequestFromSessionCaches(context, *request);
</del><ins>+        downcast&lt;WorkerGlobalScope&gt;(context).thread().workerLoaderProxy().postTaskToLoader([request = request.isolatedCopy()] (ScriptExecutionContext&amp; context) {
+            MemoryCache::removeRequestFromSessionCaches(context, request);
</ins><span class="cx">         });
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceErrorBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> const char* const errorDomainWebKitInternal = &quot;WebKitInternal&quot;;
</span><span class="cx"> 
</span><del>-ResourceError ResourceErrorBase::copy() const
</del><ins>+ResourceError ResourceErrorBase::isolatedCopy() const
</ins><span class="cx"> {
</span><span class="cx">     lazyInit();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceErrorBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceErrorBase.h (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceErrorBase.h        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/ResourceErrorBase.h        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef ResourceErrorBase_h
-#define ResourceErrorBase_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="lines">@@ -37,8 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> class ResourceErrorBase {
</span><span class="cx"> public:
</span><del>-    // Makes a deep copy. Useful for when you need to use a ResourceError on another thread.
-    ResourceError copy() const;
</del><ins>+    ResourceError isolatedCopy() const;
</ins><span class="cx"> 
</span><span class="cx">     bool isNull() const { return m_isNull; }
</span><span class="cx"> 
</span><span class="lines">@@ -99,5 +97,3 @@
</span><span class="cx"> inline bool operator!=(const ResourceError&amp; a, const ResourceError&amp; b) { return !(a == b); }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // ResourceErrorBase_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -49,20 +49,28 @@
</span><span class="cx">     return *static_cast&lt;const ResourceRequest*&gt;(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;ResourceRequest&gt; ResourceRequestBase::adopt(std::unique_ptr&lt;CrossThreadResourceRequestData&gt; data)
</del><ins>+ResourceRequest ResourceRequestBase::isolatedCopy() const
</ins><span class="cx"> {
</span><del>-    auto request = std::make_unique&lt;ResourceRequest&gt;();
-    request-&gt;setURL(data-&gt;url);
-    request-&gt;setCachePolicy(data-&gt;cachePolicy);
-    request-&gt;setTimeoutInterval(data-&gt;timeoutInterval);
-    request-&gt;setFirstPartyForCookies(data-&gt;firstPartyForCookies);
-    request-&gt;setHTTPMethod(data-&gt;httpMethod);
-    request-&gt;setPriority(data-&gt;priority);
-    request-&gt;setRequester(data-&gt;requester);
</del><ins>+    ResourceRequest request;
+    request.setAsIsolatedCopy(*this);
+    return request;
+}
</ins><span class="cx"> 
</span><del>-    request-&gt;updateResourceRequest();
-    request-&gt;m_httpHeaderFields.adopt(WTFMove(data-&gt;httpHeaders));
</del><ins>+void ResourceRequestBase::setAsIsolatedCopy(const ResourceRequestBase&amp; other)
+{
+    auto data = other.copyData();
</ins><span class="cx"> 
</span><ins>+    setURL(data-&gt;url);
+    setCachePolicy(data-&gt;cachePolicy);
+    setTimeoutInterval(data-&gt;timeoutInterval);
+    setFirstPartyForCookies(data-&gt;firstPartyForCookies);
+    setHTTPMethod(data-&gt;httpMethod);
+    setPriority(data-&gt;priority);
+    setRequester(data-&gt;requester);
+
+    updateResourceRequest();
+    m_httpHeaderFields.adopt(WTFMove(data-&gt;httpHeaders));
+
</ins><span class="cx">     size_t encodingCount = data-&gt;responseContentDispositionEncodingFallbackArray.size();
</span><span class="cx">     if (encodingCount &gt; 0) {
</span><span class="cx">         String encoding1 = data-&gt;responseContentDispositionEncodingFallbackArray[0];
</span><span class="lines">@@ -74,12 +82,12 @@
</span><span class="cx">                 encoding3 = data-&gt;responseContentDispositionEncodingFallbackArray[2];
</span><span class="cx">         }
</span><span class="cx">         ASSERT(encodingCount &lt;= 3);
</span><del>-        request-&gt;setResponseContentDispositionEncodingFallbackArray(encoding1, encoding2, encoding3);
</del><ins>+        setResponseContentDispositionEncodingFallbackArray(encoding1, encoding2, encoding3);
</ins><span class="cx">     }
</span><del>-    request-&gt;setHTTPBody(data-&gt;httpBody.copyRef());
-    request-&gt;setAllowCookies(data-&gt;allowCookies);
-    request-&gt;doPlatformAdopt(WTFMove(data));
-    return request;
</del><ins>+    setHTTPBody(data-&gt;httpBody.copyRef());
+    setAllowCookies(data-&gt;allowCookies);
+
+    const_cast&lt;ResourceRequest&amp;&gt;(asResourceRequest()).doPlatformAdopt(WTFMove(data));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;CrossThreadResourceRequestData&gt; ResourceRequestBase::copyData() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.h (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.h        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.h        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -35,221 +35,222 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-    enum ResourceRequestCachePolicy {
-        UseProtocolCachePolicy, // normal load
-        ReloadIgnoringCacheData, // reload
-        ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data
-        ReturnCacheDataDontLoad  // results of a post - allow stale data and only use cache
-    };
</del><ins>+enum ResourceRequestCachePolicy {
+    UseProtocolCachePolicy, // normal load
+    ReloadIgnoringCacheData, // reload
+    ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data
+    ReturnCacheDataDontLoad  // results of a post - allow stale data and only use cache
+};
</ins><span class="cx"> 
</span><del>-    enum HTTPBodyUpdatePolicy {
-        DoNotUpdateHTTPBody,
-        UpdateHTTPBody
-    };
</del><ins>+enum HTTPBodyUpdatePolicy {
+    DoNotUpdateHTTPBody,
+    UpdateHTTPBody
+};
</ins><span class="cx"> 
</span><del>-    class ResourceRequest;
-    struct CrossThreadResourceRequestData;
</del><ins>+class ResourceRequest;
+struct CrossThreadResourceRequestData;
</ins><span class="cx"> 
</span><del>-    // Do not use this type directly.  Use ResourceRequest instead.
-    class ResourceRequestBase {
-        WTF_MAKE_FAST_ALLOCATED;
-    public:
-        WEBCORE_EXPORT static std::unique_ptr&lt;ResourceRequest&gt; adopt(std::unique_ptr&lt;CrossThreadResourceRequestData&gt;);
</del><ins>+// Do not use this type directly.  Use ResourceRequest instead.
+class ResourceRequestBase {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    ResourceRequest isolatedCopy() const;
+    WEBCORE_EXPORT void setAsIsolatedCopy(const ResourceRequestBase&amp;);
</ins><span class="cx"> 
</span><del>-        // Gets a copy of the data suitable for passing to another thread.
-        WEBCORE_EXPORT std::unique_ptr&lt;CrossThreadResourceRequestData&gt; copyData() const;
</del><ins>+    WEBCORE_EXPORT bool isNull() const;
+    WEBCORE_EXPORT bool isEmpty() const;
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT bool isNull() const;
-        WEBCORE_EXPORT bool isEmpty() const;
</del><ins>+    WEBCORE_EXPORT const URL&amp; url() const;
+    WEBCORE_EXPORT void setURL(const URL&amp; url);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT const URL&amp; url() const;
-        WEBCORE_EXPORT void setURL(const URL&amp; url);
</del><ins>+    WEBCORE_EXPORT void removeCredentials();
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT void removeCredentials();
</del><ins>+    WEBCORE_EXPORT ResourceRequestCachePolicy cachePolicy() const;
+    WEBCORE_EXPORT void setCachePolicy(ResourceRequestCachePolicy cachePolicy);
+    
+    double timeoutInterval() const; // May return 0 when using platform default.
+    void setTimeoutInterval(double timeoutInterval);
+    
+    WEBCORE_EXPORT const URL&amp; firstPartyForCookies() const;
+    WEBCORE_EXPORT void setFirstPartyForCookies(const URL&amp;);
+    
+    WEBCORE_EXPORT const String&amp; httpMethod() const;
+    WEBCORE_EXPORT void setHTTPMethod(const String&amp; httpMethod);
+    
+    WEBCORE_EXPORT const HTTPHeaderMap&amp; httpHeaderFields() const;
+    WEBCORE_EXPORT void setHTTPHeaderFields(HTTPHeaderMap);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT ResourceRequestCachePolicy cachePolicy() const;
-        WEBCORE_EXPORT void setCachePolicy(ResourceRequestCachePolicy cachePolicy);
-        
-        double timeoutInterval() const; // May return 0 when using platform default.
-        void setTimeoutInterval(double timeoutInterval);
-        
-        WEBCORE_EXPORT const URL&amp; firstPartyForCookies() const;
-        WEBCORE_EXPORT void setFirstPartyForCookies(const URL&amp;);
-        
-        WEBCORE_EXPORT const String&amp; httpMethod() const;
-        WEBCORE_EXPORT void setHTTPMethod(const String&amp; httpMethod);
-        
-        WEBCORE_EXPORT const HTTPHeaderMap&amp; httpHeaderFields() const;
-        WEBCORE_EXPORT void setHTTPHeaderFields(HTTPHeaderMap);
</del><ins>+    WEBCORE_EXPORT String httpHeaderField(const String&amp; name) const;
+    WEBCORE_EXPORT String httpHeaderField(HTTPHeaderName) const;
+    WEBCORE_EXPORT void setHTTPHeaderField(const String&amp; name, const String&amp; value);
+    WEBCORE_EXPORT void setHTTPHeaderField(HTTPHeaderName, const String&amp; value);
+    void addHTTPHeaderField(HTTPHeaderName, const String&amp; value);
+    void addHTTPHeaderField(const String&amp; name, const String&amp; value);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT String httpHeaderField(const String&amp; name) const;
-        WEBCORE_EXPORT String httpHeaderField(HTTPHeaderName) const;
-        WEBCORE_EXPORT void setHTTPHeaderField(const String&amp; name, const String&amp; value);
-        WEBCORE_EXPORT void setHTTPHeaderField(HTTPHeaderName, const String&amp; value);
-        void addHTTPHeaderField(HTTPHeaderName, const String&amp; value);
-        void addHTTPHeaderField(const String&amp; name, const String&amp; value);
</del><ins>+    // Instead of passing a string literal to any of these functions, just use a HTTPHeaderName instead.
+    template&lt;size_t length&gt; String httpHeaderField(const char (&amp;)[length]) const = delete;
+    template&lt;size_t length&gt; void setHTTPHeaderField(const char (&amp;)[length], const String&amp;) = delete;
+    template&lt;size_t length&gt; void addHTTPHeaderField(const char (&amp;)[length], const String&amp;) = delete;
</ins><span class="cx"> 
</span><del>-        // Instead of passing a string literal to any of these functions, just use a HTTPHeaderName instead.
-        template&lt;size_t length&gt; String httpHeaderField(const char (&amp;)[length]) const = delete;
-        template&lt;size_t length&gt; void setHTTPHeaderField(const char (&amp;)[length], const String&amp;) = delete;
-        template&lt;size_t length&gt; void addHTTPHeaderField(const char (&amp;)[length], const String&amp;) = delete;
</del><ins>+    WEBCORE_EXPORT void clearHTTPAuthorization();
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT void clearHTTPAuthorization();
</del><ins>+    WEBCORE_EXPORT String httpContentType() const;
+    WEBCORE_EXPORT void setHTTPContentType(const String&amp;);
+    void clearHTTPContentType();
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT String httpContentType() const;
-        WEBCORE_EXPORT void setHTTPContentType(const String&amp;);
-        void clearHTTPContentType();
</del><ins>+    WEBCORE_EXPORT String httpReferrer() const;
+    WEBCORE_EXPORT void setHTTPReferrer(const String&amp;);
+    WEBCORE_EXPORT void clearHTTPReferrer();
+    
+    String httpOrigin() const;
+    void setHTTPOrigin(const String&amp;);
+    WEBCORE_EXPORT void clearHTTPOrigin();
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT String httpReferrer() const;
-        WEBCORE_EXPORT void setHTTPReferrer(const String&amp;);
-        WEBCORE_EXPORT void clearHTTPReferrer();
-        
-        String httpOrigin() const;
-        void setHTTPOrigin(const String&amp;);
-        WEBCORE_EXPORT void clearHTTPOrigin();
</del><ins>+    WEBCORE_EXPORT String httpUserAgent() const;
+    WEBCORE_EXPORT void setHTTPUserAgent(const String&amp;);
+    void clearHTTPUserAgent();
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT String httpUserAgent() const;
-        WEBCORE_EXPORT void setHTTPUserAgent(const String&amp;);
-        void clearHTTPUserAgent();
</del><ins>+    String httpAccept() const;
+    void setHTTPAccept(const String&amp;);
+    void clearHTTPAccept();
</ins><span class="cx"> 
</span><del>-        String httpAccept() const;
-        void setHTTPAccept(const String&amp;);
-        void clearHTTPAccept();
</del><ins>+    void clearHTTPAcceptEncoding();
</ins><span class="cx"> 
</span><del>-        void clearHTTPAcceptEncoding();
</del><ins>+    const Vector&lt;String&gt;&amp; responseContentDispositionEncodingFallbackArray() const { return m_responseContentDispositionEncodingFallbackArray; }
+    WEBCORE_EXPORT void setResponseContentDispositionEncodingFallbackArray(const String&amp; encoding1, const String&amp; encoding2 = String(), const String&amp; encoding3 = String());
</ins><span class="cx"> 
</span><del>-        const Vector&lt;String&gt;&amp; responseContentDispositionEncodingFallbackArray() const { return m_responseContentDispositionEncodingFallbackArray; }
-        WEBCORE_EXPORT void setResponseContentDispositionEncodingFallbackArray(const String&amp; encoding1, const String&amp; encoding2 = String(), const String&amp; encoding3 = String());
</del><ins>+    WEBCORE_EXPORT FormData* httpBody() const;
+    WEBCORE_EXPORT void setHTTPBody(RefPtr&lt;FormData&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT FormData* httpBody() const;
-        WEBCORE_EXPORT void setHTTPBody(RefPtr&lt;FormData&gt;&amp;&amp;);
</del><ins>+    bool allowCookies() const;
+    void setAllowCookies(bool allowCookies);
</ins><span class="cx"> 
</span><del>-        bool allowCookies() const;
-        void setAllowCookies(bool allowCookies);
</del><ins>+    WEBCORE_EXPORT ResourceLoadPriority priority() const;
+    WEBCORE_EXPORT void setPriority(ResourceLoadPriority);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT ResourceLoadPriority priority() const;
-        WEBCORE_EXPORT void setPriority(ResourceLoadPriority);
</del><ins>+    WEBCORE_EXPORT bool isConditional() const;
+    WEBCORE_EXPORT void makeUnconditional();
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT bool isConditional() const;
-        WEBCORE_EXPORT void makeUnconditional();
</del><ins>+    // Whether the associated ResourceHandleClient needs to be notified of
+    // upload progress made for that resource.
+    bool reportUploadProgress() const { return m_reportUploadProgress; }
+    void setReportUploadProgress(bool reportUploadProgress) { m_reportUploadProgress = reportUploadProgress; }
</ins><span class="cx"> 
</span><del>-        // Whether the associated ResourceHandleClient needs to be notified of
-        // upload progress made for that resource.
-        bool reportUploadProgress() const { return m_reportUploadProgress; }
-        void setReportUploadProgress(bool reportUploadProgress) { m_reportUploadProgress = reportUploadProgress; }
</del><ins>+    // Whether the timing information should be collected for the request.
+    bool reportLoadTiming() const { return m_reportLoadTiming; }
+    void setReportLoadTiming(bool reportLoadTiming) { m_reportLoadTiming = reportLoadTiming; }
</ins><span class="cx"> 
</span><del>-        // Whether the timing information should be collected for the request.
-        bool reportLoadTiming() const { return m_reportLoadTiming; }
-        void setReportLoadTiming(bool reportLoadTiming) { m_reportLoadTiming = reportLoadTiming; }
</del><ins>+    // Whether actual headers being sent/received should be collected and reported for the request.
+    bool reportRawHeaders() const { return m_reportRawHeaders; }
+    void setReportRawHeaders(bool reportRawHeaders) { m_reportRawHeaders = reportRawHeaders; }
</ins><span class="cx"> 
</span><del>-        // Whether actual headers being sent/received should be collected and reported for the request.
-        bool reportRawHeaders() const { return m_reportRawHeaders; }
-        void setReportRawHeaders(bool reportRawHeaders) { m_reportRawHeaders = reportRawHeaders; }
</del><ins>+    // Whether this request should be hidden from the Inspector.
+    bool hiddenFromInspector() const { return m_hiddenFromInspector; }
+    void setHiddenFromInspector(bool hiddenFromInspector) { m_hiddenFromInspector = hiddenFromInspector; }
</ins><span class="cx"> 
</span><del>-        // Whether this request should be hidden from the Inspector.
-        bool hiddenFromInspector() const { return m_hiddenFromInspector; }
-        void setHiddenFromInspector(bool hiddenFromInspector) { m_hiddenFromInspector = hiddenFromInspector; }
</del><ins>+    enum class Requester { Unspecified, Main, XHR, Media };
+    Requester requester() const { return m_requester; }
+    void setRequester(Requester requester) { m_requester = requester; }
</ins><span class="cx"> 
</span><del>-        enum class Requester { Unspecified, Main, XHR, Media };
-        Requester requester() const { return m_requester; }
-        void setRequester(Requester requester) { m_requester = requester; }
-
</del><span class="cx"> #if !PLATFORM(COCOA)
</span><del>-        bool encodingRequiresPlatformData() const { return true; }
</del><ins>+    bool encodingRequiresPlatformData() const { return true; }
</ins><span class="cx"> #endif
</span><del>-        template&lt;class Encoder&gt; void encodeWithoutPlatformData(Encoder&amp;) const;
-        template&lt;class Decoder&gt; bool decodeWithoutPlatformData(Decoder&amp;);
</del><ins>+    template&lt;class Encoder&gt; void encodeWithoutPlatformData(Encoder&amp;) const;
+    template&lt;class Decoder&gt; bool decodeWithoutPlatformData(Decoder&amp;);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT static double defaultTimeoutInterval(); // May return 0 when using platform default.
-        WEBCORE_EXPORT static void setDefaultTimeoutInterval(double);
</del><ins>+    WEBCORE_EXPORT static double defaultTimeoutInterval(); // May return 0 when using platform default.
+    WEBCORE_EXPORT static void setDefaultTimeoutInterval(double);
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-        WEBCORE_EXPORT static bool defaultAllowCookies();
-        WEBCORE_EXPORT static void setDefaultAllowCookies(bool);
</del><ins>+    WEBCORE_EXPORT static bool defaultAllowCookies();
+    WEBCORE_EXPORT static void setDefaultAllowCookies(bool);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        static bool compare(const ResourceRequest&amp;, const ResourceRequest&amp;);
</del><ins>+    static bool compare(const ResourceRequest&amp;, const ResourceRequest&amp;);
</ins><span class="cx"> 
</span><del>-    protected:
-        // Used when ResourceRequest is initialized from a platform representation of the request
-        ResourceRequestBase()
-            : m_platformRequestUpdated(true)
-            , m_platformRequestBodyUpdated(true)
-        {
-        }
</del><ins>+protected:
+    // Used when ResourceRequest is initialized from a platform representation of the request
+    ResourceRequestBase()
+        : m_platformRequestUpdated(true)
+        , m_platformRequestBodyUpdated(true)
+    {
+    }
</ins><span class="cx"> 
</span><del>-        ResourceRequestBase(const URL&amp; url, ResourceRequestCachePolicy policy)
-            : m_url(url)
-            , m_timeoutInterval(s_defaultTimeoutInterval)
-            , m_httpMethod(ASCIILiteral(&quot;GET&quot;))
-            , m_cachePolicy(policy)
</del><ins>+    ResourceRequestBase(const URL&amp; url, ResourceRequestCachePolicy policy)
+        : m_url(url)
+        , m_timeoutInterval(s_defaultTimeoutInterval)
+        , m_httpMethod(ASCIILiteral(&quot;GET&quot;))
+        , m_cachePolicy(policy)
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><del>-            , m_allowCookies(true)
</del><ins>+        , m_allowCookies(true)
</ins><span class="cx"> #else
</span><del>-            , m_allowCookies(ResourceRequestBase::defaultAllowCookies())
</del><ins>+        , m_allowCookies(ResourceRequestBase::defaultAllowCookies())
</ins><span class="cx"> #endif
</span><del>-            , m_resourceRequestUpdated(true)
-            , m_resourceRequestBodyUpdated(true)
-        {
-        }
</del><ins>+        , m_resourceRequestUpdated(true)
+        , m_resourceRequestBodyUpdated(true)
+    {
+    }
</ins><span class="cx"> 
</span><del>-        void updatePlatformRequest(HTTPBodyUpdatePolicy = DoNotUpdateHTTPBody) const;
-        void updateResourceRequest(HTTPBodyUpdatePolicy = DoNotUpdateHTTPBody) const;
</del><ins>+    void updatePlatformRequest(HTTPBodyUpdatePolicy = DoNotUpdateHTTPBody) const;
+    void updateResourceRequest(HTTPBodyUpdatePolicy = DoNotUpdateHTTPBody) const;
</ins><span class="cx"> 
</span><del>-        // The ResourceRequest subclass may &quot;shadow&quot; this method to compare platform specific fields
-        static bool platformCompare(const ResourceRequest&amp;, const ResourceRequest&amp;) { return true; }
</del><ins>+    // The ResourceRequest subclass may &quot;shadow&quot; this method to compare platform specific fields
+    static bool platformCompare(const ResourceRequest&amp;, const ResourceRequest&amp;) { return true; }
</ins><span class="cx"> 
</span><del>-        URL m_url;
-        double m_timeoutInterval; // 0 is a magic value for platform default on platforms that have one.
-        URL m_firstPartyForCookies;
-        String m_httpMethod;
-        HTTPHeaderMap m_httpHeaderFields;
-        Vector&lt;String&gt; m_responseContentDispositionEncodingFallbackArray;
-        RefPtr&lt;FormData&gt; m_httpBody;
-        ResourceRequestCachePolicy m_cachePolicy { UseProtocolCachePolicy };
-        bool m_allowCookies { false };
-        mutable bool m_resourceRequestUpdated { false };
-        mutable bool m_platformRequestUpdated { false };
-        mutable bool m_resourceRequestBodyUpdated { false };
-        mutable bool m_platformRequestBodyUpdated { false };
-        bool m_reportUploadProgress { false };
-        bool m_reportLoadTiming { false };
-        bool m_reportRawHeaders { false };
-        bool m_hiddenFromInspector { false };
-        ResourceLoadPriority m_priority { ResourceLoadPriority::Low };
-        Requester m_requester { Requester::Unspecified };
</del><ins>+    URL m_url;
+    double m_timeoutInterval; // 0 is a magic value for platform default on platforms that have one.
+    URL m_firstPartyForCookies;
+    String m_httpMethod;
+    HTTPHeaderMap m_httpHeaderFields;
+    Vector&lt;String&gt; m_responseContentDispositionEncodingFallbackArray;
+    RefPtr&lt;FormData&gt; m_httpBody;
+    ResourceRequestCachePolicy m_cachePolicy { UseProtocolCachePolicy };
+    bool m_allowCookies { false };
+    mutable bool m_resourceRequestUpdated { false };
+    mutable bool m_platformRequestUpdated { false };
+    mutable bool m_resourceRequestBodyUpdated { false };
+    mutable bool m_platformRequestBodyUpdated { false };
+    bool m_reportUploadProgress { false };
+    bool m_reportLoadTiming { false };
+    bool m_reportRawHeaders { false };
+    bool m_hiddenFromInspector { false };
+    ResourceLoadPriority m_priority { ResourceLoadPriority::Low };
+    Requester m_requester { Requester::Unspecified };
</ins><span class="cx"> 
</span><del>-    private:
-        const ResourceRequest&amp; asResourceRequest() const;
</del><ins>+private:
+    const ResourceRequest&amp; asResourceRequest() const;
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT static double s_defaultTimeoutInterval;
</del><ins>+    // Gets a copy of the data suitable for passing to another thread.
+    std::unique_ptr&lt;CrossThreadResourceRequestData&gt; copyData() const;
+
+    WEBCORE_EXPORT static double s_defaultTimeoutInterval;
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>-        static bool s_defaultAllowCookies;
</del><ins>+    static bool s_defaultAllowCookies;
</ins><span class="cx"> #endif
</span><del>-    };
</del><ins>+};
</ins><span class="cx"> 
</span><del>-    bool equalIgnoringHeaderFields(const ResourceRequestBase&amp;, const ResourceRequestBase&amp;);
</del><ins>+bool equalIgnoringHeaderFields(const ResourceRequestBase&amp;, const ResourceRequestBase&amp;);
</ins><span class="cx"> 
</span><del>-    inline bool operator==(const ResourceRequest&amp; a, const ResourceRequest&amp; b) { return ResourceRequestBase::compare(a, b); }
-    inline bool operator!=(ResourceRequest&amp; a, const ResourceRequest&amp; b) { return !(a == b); }
</del><ins>+inline bool operator==(const ResourceRequest&amp; a, const ResourceRequest&amp; b) { return ResourceRequestBase::compare(a, b); }
+inline bool operator!=(ResourceRequest&amp; a, const ResourceRequest&amp; b) { return !(a == b); }
</ins><span class="cx"> 
</span><del>-    struct CrossThreadResourceRequestDataBase {
-        URL url;
-        ResourceRequestCachePolicy cachePolicy;
-        double timeoutInterval;
-        URL firstPartyForCookies;
-        String httpMethod;
-        std::unique_ptr&lt;CrossThreadHTTPHeaderMapData&gt; httpHeaders;
-        Vector&lt;String&gt; responseContentDispositionEncodingFallbackArray;
-        RefPtr&lt;FormData&gt; httpBody;
-        bool allowCookies;
-        ResourceLoadPriority priority;
-        ResourceRequestBase::Requester requester;
-    };
-    
-    WEBCORE_EXPORT unsigned initializeMaximumHTTPConnectionCountPerHost();
</del><ins>+struct CrossThreadResourceRequestDataBase {
+    URL url;
+    ResourceRequestCachePolicy cachePolicy;
+    double timeoutInterval;
+    URL firstPartyForCookies;
+    String httpMethod;
+    std::unique_ptr&lt;CrossThreadHTTPHeaderMapData&gt; httpHeaders;
+    Vector&lt;String&gt; responseContentDispositionEncodingFallbackArray;
+    RefPtr&lt;FormData&gt; httpBody;
+    bool allowCookies;
+    ResourceLoadPriority priority;
+    ResourceRequestBase::Requester requester;
+};
+
+WEBCORE_EXPORT unsigned initializeMaximumHTTPConnectionCountPerHost();
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>-    WEBCORE_EXPORT void initializeHTTPConnectionSettingsOnStartup();
</del><ins>+WEBCORE_EXPORT void initializeHTTPConnectionSettingsOnStartup();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> template&lt;class Encoder&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -63,23 +63,26 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;ResourceResponse&gt; ResourceResponseBase::adopt(std::unique_ptr&lt;CrossThreadResourceResponseData&gt; data)
</del><ins>+ResourceResponse ResourceResponseBase::isolatedCopy() const
</ins><span class="cx"> {
</span><del>-    auto response = std::make_unique&lt;ResourceResponse&gt;();
-    response-&gt;setURL(data-&gt;m_url);
-    response-&gt;setMimeType(data-&gt;m_mimeType);
-    response-&gt;setExpectedContentLength(data-&gt;m_expectedContentLength);
-    response-&gt;setTextEncodingName(data-&gt;m_textEncodingName);
</del><ins>+    ResourceResponse response;
+    auto data = copyData();
</ins><span class="cx"> 
</span><del>-    response-&gt;setHTTPStatusCode(data-&gt;m_httpStatusCode);
-    response-&gt;setHTTPStatusText(data-&gt;m_httpStatusText);
-    response-&gt;setHTTPVersion(data-&gt;m_httpVersion);
</del><ins>+    response.setURL(data-&gt;m_url);
+    response.setMimeType(data-&gt;m_mimeType);
+    response.setExpectedContentLength(data-&gt;m_expectedContentLength);
+    response.setTextEncodingName(data-&gt;m_textEncodingName);
</ins><span class="cx"> 
</span><del>-    response-&gt;lazyInit(AllFields);
-    response-&gt;m_httpHeaderFields.adopt(WTFMove(data-&gt;m_httpHeaders));
-    response-&gt;m_resourceLoadTiming = data-&gt;m_resourceLoadTiming;
-    response-&gt;m_type = data-&gt;m_type;
-    response-&gt;doPlatformAdopt(WTFMove(data));
</del><ins>+    response.setHTTPStatusCode(data-&gt;m_httpStatusCode);
+    response.setHTTPStatusText(data-&gt;m_httpStatusText);
+    response.setHTTPVersion(data-&gt;m_httpVersion);
+
+    response.lazyInit(AllFields);
+    response.m_httpHeaderFields.adopt(WTFMove(data-&gt;m_httpHeaders));
+    response.m_resourceLoadTiming = data-&gt;m_resourceLoadTiming;
+    response.m_type = data-&gt;m_type;
+    response.doPlatformAdopt(WTFMove(data));
+
</ins><span class="cx">     return response;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -24,8 +24,7 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef ResourceResponseBase_h
-#define ResourceResponseBase_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;CacheValidation.h&quot;
</span><span class="cx"> #include &quot;CertificateInfo.h&quot;
</span><span class="lines">@@ -47,11 +46,8 @@
</span><span class="cx"> class ResourceResponseBase {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static std::unique_ptr&lt;ResourceResponse&gt; adopt(std::unique_ptr&lt;CrossThreadResourceResponseData&gt;);
</del><ins>+    ResourceResponse isolatedCopy() const;
</ins><span class="cx"> 
</span><del>-    // Gets a copy of the data suitable for passing to another thread.
-    std::unique_ptr&lt;CrossThreadResourceResponseData&gt; copyData() const;
-
</del><span class="cx">     bool isNull() const { return m_isNull; }
</span><span class="cx">     WEBCORE_EXPORT bool isHTTP() const;
</span><span class="cx"> 
</span><span class="lines">@@ -163,6 +159,9 @@
</span><span class="cx">     void parseCacheControlDirectives() const;
</span><span class="cx">     void updateHeaderParsedState(HTTPHeaderName);
</span><span class="cx"> 
</span><ins>+    // Gets a copy of the data suitable for passing to another thread.
+    std::unique_ptr&lt;CrossThreadResourceResponseData&gt; copyData() const;
+
</ins><span class="cx"> protected:
</span><span class="cx">     bool m_isNull;
</span><span class="cx">     URL m_url;
</span><span class="lines">@@ -293,5 +292,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // ResourceResponseBase_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceError.h (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceError.h        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/cf/ResourceError.h        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef ResourceError_h
-#define ResourceError_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;ResourceErrorBase.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -61,8 +60,6 @@
</span><span class="cx">     WEBCORE_EXPORT CFErrorRef cfError() const;
</span><span class="cx">     WEBCORE_EXPORT operator CFErrorRef() const;
</span><span class="cx"> 
</span><del>-    ResourceError isolatedCopy() const { return copy(); }
-
</del><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     ResourceError(const String&amp; domain, int errorCode, const URL&amp; failingURL, const String&amp; localizedDescription, CFDataRef certificate);
</span><span class="lines">@@ -102,5 +99,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // ResourceError_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequest.h (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -38,120 +38,118 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-    class ResourceRequest : public ResourceRequestBase {
-    public:
-        ResourceRequest(const String&amp; url) 
-            : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
-        {
-        }
</del><ins>+class ResourceRequest : public ResourceRequestBase {
+public:
+    ResourceRequest(const String&amp; url) 
+        : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
+    {
+    }
</ins><span class="cx"> 
</span><del>-        ResourceRequest(const URL&amp; url) 
-            : ResourceRequestBase(url, UseProtocolCachePolicy)
-        {
-        }
</del><ins>+    ResourceRequest(const URL&amp; url) 
+        : ResourceRequestBase(url, UseProtocolCachePolicy)
+    {
+    }
</ins><span class="cx"> 
</span><del>-        ResourceRequest(const URL&amp; url, const String&amp; referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
-            : ResourceRequestBase(url, policy)
-        {
-            setHTTPReferrer(referrer);
-        }
-        
-        ResourceRequest()
-            : ResourceRequestBase(URL(), UseProtocolCachePolicy)
-        {
-        }
-        
</del><ins>+    ResourceRequest(const URL&amp; url, const String&amp; referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
+        : ResourceRequestBase(url, policy)
+    {
+        setHTTPReferrer(referrer);
+    }
+    
+    ResourceRequest()
+        : ResourceRequestBase(URL(), UseProtocolCachePolicy)
+    {
+    }
+    
</ins><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-        WEBCORE_EXPORT ResourceRequest(NSURLRequest *);
-        void updateNSURLRequest();
-        void clearOrUpdateNSURLRequest();
</del><ins>+    WEBCORE_EXPORT ResourceRequest(NSURLRequest *);
+    void updateNSURLRequest();
+    void clearOrUpdateNSURLRequest();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        ResourceRequest(CFURLRequestRef cfRequest)
-            : ResourceRequestBase()
-            , m_cfRequest(cfRequest)
-        {
-        }
</del><ins>+    ResourceRequest(CFURLRequestRef cfRequest)
+        : ResourceRequestBase()
+        , m_cfRequest(cfRequest)
+    {
+    }
</ins><span class="cx"> #else
</span><del>-        ResourceRequest(NSURLRequest *nsRequest)
-            : ResourceRequestBase()
-            , m_nsRequest(nsRequest)
-        {
-        }
</del><ins>+    ResourceRequest(NSURLRequest *nsRequest)
+        : ResourceRequestBase()
+        , m_nsRequest(nsRequest)
+    {
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        ResourceRequest isolatedCopy() const { return *ResourceRequest::adopt(copyData()); }
</del><ins>+    WEBCORE_EXPORT void updateFromDelegatePreservingOldProperties(const ResourceRequest&amp;);
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT void updateFromDelegatePreservingOldProperties(const ResourceRequest&amp;);
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>-        void applyWebArchiveHackForMail();
</del><ins>+    void applyWebArchiveHackForMail();
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> #if USE(CFNETWORK)
</span><del>-        bool encodingRequiresPlatformData() const { return m_httpBody || m_cfRequest; }
</del><ins>+    bool encodingRequiresPlatformData() const { return m_httpBody || m_cfRequest; }
</ins><span class="cx"> #else
</span><del>-        bool encodingRequiresPlatformData() const { return m_httpBody || m_nsRequest; }
</del><ins>+    bool encodingRequiresPlatformData() const { return m_httpBody || m_nsRequest; }
</ins><span class="cx"> #endif
</span><del>-        WEBCORE_EXPORT NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
</del><ins>+    WEBCORE_EXPORT NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
</ins><span class="cx"> 
</span><del>-        WEBCORE_EXPORT static CFStringRef isUserInitiatedKey();
</del><ins>+    WEBCORE_EXPORT static CFStringRef isUserInitiatedKey();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><del>-        WEBCORE_EXPORT static String partitionName(const String&amp; domain);
-        const String&amp; cachePartition() const { return m_cachePartition.isNull() ? emptyString() : m_cachePartition; }
-        void setCachePartition(const String&amp; cachePartition)
-        {
-            ASSERT(cachePartition == partitionName(cachePartition));
-            m_cachePartition = cachePartition;
-        }
-        void setDomainForCachePartition(const String&amp; domain) { m_cachePartition = partitionName(domain); }
</del><ins>+    WEBCORE_EXPORT static String partitionName(const String&amp; domain);
+    const String&amp; cachePartition() const { return m_cachePartition.isNull() ? emptyString() : m_cachePartition; }
+    void setCachePartition(const String&amp; cachePartition)
+    {
+        ASSERT(cachePartition == partitionName(cachePartition));
+        m_cachePartition = cachePartition;
+    }
+    void setDomainForCachePartition(const String&amp; domain) { m_cachePartition = partitionName(domain); }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA) || USE(CFNETWORK)
</span><del>-        WEBCORE_EXPORT CFURLRequestRef cfURLRequest(HTTPBodyUpdatePolicy) const;
-        void setStorageSession(CFURLStorageSessionRef);
</del><ins>+    WEBCORE_EXPORT CFURLRequestRef cfURLRequest(HTTPBodyUpdatePolicy) const;
+    void setStorageSession(CFURLStorageSessionRef);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        WEBCORE_EXPORT static bool httpPipeliningEnabled();
-        WEBCORE_EXPORT static void setHTTPPipeliningEnabled(bool);
</del><ins>+    WEBCORE_EXPORT static bool httpPipeliningEnabled();
+    WEBCORE_EXPORT static void setHTTPPipeliningEnabled(bool);
</ins><span class="cx"> 
</span><del>-        static bool resourcePrioritiesEnabled();
</del><ins>+    static bool resourcePrioritiesEnabled();
</ins><span class="cx"> 
</span><del>-    private:
-        friend class ResourceRequestBase;
</del><ins>+private:
+    friend class ResourceRequestBase;
</ins><span class="cx"> 
</span><del>-        void doUpdatePlatformRequest();
-        void doUpdateResourceRequest();
-        void doUpdatePlatformHTTPBody();
-        void doUpdateResourceHTTPBody();
</del><ins>+    void doUpdatePlatformRequest();
+    void doUpdateResourceRequest();
+    void doUpdatePlatformHTTPBody();
+    void doUpdateResourceHTTPBody();
</ins><span class="cx"> 
</span><del>-        std::unique_ptr&lt;CrossThreadResourceRequestData&gt; doPlatformCopyData(std::unique_ptr&lt;CrossThreadResourceRequestData&gt;) const;
-        void doPlatformAdopt(std::unique_ptr&lt;CrossThreadResourceRequestData&gt;);
</del><ins>+    std::unique_ptr&lt;CrossThreadResourceRequestData&gt; doPlatformCopyData(std::unique_ptr&lt;CrossThreadResourceRequestData&gt;) const;
+    void doPlatformAdopt(std::unique_ptr&lt;CrossThreadResourceRequestData&gt;);
</ins><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><del>-        RetainPtr&lt;CFURLRequestRef&gt; m_cfRequest;
</del><ins>+    RetainPtr&lt;CFURLRequestRef&gt; m_cfRequest;
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-        RetainPtr&lt;NSURLRequest&gt; m_nsRequest;
</del><ins>+    RetainPtr&lt;NSURLRequest&gt; m_nsRequest;
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><del>-        String m_cachePartition;
</del><ins>+    String m_cachePartition;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        static bool s_httpPipeliningEnabled;
-    };
</del><ins>+    static bool s_httpPipeliningEnabled;
+};
</ins><span class="cx"> 
</span><del>-    struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
</del><ins>+struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
</ins><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><del>-        String m_cachePartition;
</del><ins>+    String m_cachePartition;
</ins><span class="cx"> #endif
</span><del>-    };
</del><ins>+};
</ins><span class="cx"> 
</span><del>-    inline bool ResourceRequest::resourcePrioritiesEnabled()
-    {
</del><ins>+inline bool ResourceRequest::resourcePrioritiesEnabled()
+{
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     return true;
</span><span class="cx"> #elif PLATFORM(IOS)
</span><span class="lines">@@ -159,7 +157,6 @@
</span><span class="cx"> #elif PLATFORM(WIN)
</span><span class="cx">     return false;
</span><span class="cx"> #endif
</span><del>-    }
</del><ins>+}
</ins><span class="cx"> 
</span><del>-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponse.h (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -72,8 +72,6 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ResourceResponse isolatedCopy() const { return *ResourceResponse::adopt(copyData()); }
-
</del><span class="cx">     unsigned memoryUsage() const
</span><span class="cx">     {
</span><span class="cx">         // FIXME: Find some programmatic lighweight way to calculate ResourceResponse and associated classes.
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebKit2/ChangeLog        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-06-02  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Overhaul cross-thread use of ResourceRequest, ResourceResponse, and ResourceError.
+        https://bugs.webkit.org/show_bug.cgi?id=158293
+
+        Reviewed by Darin Adler.
+
+        * NetworkProcess/cache/NetworkCacheEntry.cpp:
+        (WebKit::NetworkCache::Entry::Entry):
+
</ins><span class="cx"> 2016-06-02  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Modernize various lambda captures
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscacheNetworkCacheEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp (201602 => 201603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp        2016-06-02 17:59:56 UTC (rev 201602)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp        2016-06-02 18:17:47 UTC (rev 201603)
</span><span class="lines">@@ -54,10 +54,12 @@
</span><span class="cx">     , m_timeStamp(std::chrono::system_clock::now())
</span><span class="cx">     , m_response(response)
</span><span class="cx">     , m_varyingRequestHeaders(varyingRequestHeaders)
</span><del>-    , m_redirectRequest(WebCore::ResourceRequest::adopt(redirectRequest.copyData())) // Don't include the underlying platform request object.
</del><span class="cx"> {
</span><span class="cx">     ASSERT(m_key.type() == &quot;resource&quot;);
</span><span class="cx">     // Redirect body is not needed even if exists.
</span><ins>+
+    m_redirectRequest = std::make_unique&lt;WebCore::ResourceRequest&gt;();
+    m_redirectRequest-&gt;setAsIsolatedCopy(redirectRequest);
</ins><span class="cx">     m_redirectRequest-&gt;setHTTPBody(nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>