<!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>[201623] trunk/Source/WebCore</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/201623">201623</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-06-02 15:43:25 -0700 (Thu, 02 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modernize how many platform/network classes do isolatedCopy().
https://bugs.webkit.org/show_bug.cgi?id=158313
Reviewed by Alex Christensen.
No new tests (Refactor, no behavior change).
* loader/WorkerThreadableLoader.h:
* platform/network/FormData.cpp:
(WebCore::FormData::isolatedCopy):
(WebCore::FormDataElement::isolatedCopy):
(WebCore::FormData::FormData): Deleted.
(WebCore::FormData::deepCopy): Deleted.
* platform/network/FormData.h:
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::isolatedCopy):
(WebCore::HTTPHeaderMap::copyData): Deleted.
(WebCore::HTTPHeaderMap::adopt): Deleted.
* platform/network/HTTPHeaderMap.h:
* platform/network/ResourceErrorBase.cpp:
(WebCore::ResourceErrorBase::asResourceError):
(WebCore::ResourceErrorBase::isolatedCopy):
* platform/network/ResourceErrorBase.h:
(WebCore::ResourceErrorBase::platformCopy): Deleted.
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::isolatedCopy): Not strictly needed for now, but makes it obvious
that changes will be needed if new members are added later.
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::isolatedCopy):
(WebCore::ResourceRequestBase::setAsIsolatedCopy):
(WebCore::ResourceRequestBase::copyData): Deleted.
* platform/network/ResourceRequestBase.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::isolatedCopy):
(WebCore::ResourceResponseBase::copyData): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::CrossThreadResourceResponseDataBase::CrossThreadResourceResponseDataBase): Deleted.
* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::doPlatformIsolatedCopy):
(WebCore::ResourceError::platformCopy): Deleted.
* platform/network/cf/ResourceRequest.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):
(WebCore::ResourceRequest::doPlatformCopyData): Deleted.
(WebCore::ResourceRequest::doPlatformAdopt): Deleted.
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData): Deleted.
(WebCore::ResourceResponse::doPlatformAdopt): Deleted.
* platform/network/curl/ResourceError.h:
(WebCore::ResourceError::doPlatformIsolatedCopy):
* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):
(WebCore::ResourceRequest::doPlatformCopyData): Deleted.
(WebCore::ResourceRequest::doPlatformAdopt): Deleted.
* platform/network/curl/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData): Deleted.
(WebCore::ResourceResponse::doPlatformAdopt): Deleted.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::doPlatformIsolatedCopy):
* platform/network/soup/ResourceError.h:
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::doPlatformIsolatedCopy):
(WebCore::ResourceError::platformCopy): Deleted.
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):
(WebCore::ResourceRequest::doPlatformCopyData): Deleted.
(WebCore::ResourceRequest::doPlatformAdopt): Deleted.
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData): Deleted.
(WebCore::ResourceResponse::doPlatformAdopt): Deleted.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderWorkerThreadableLoaderh">trunk/Source/WebCore/loader/WorkerThreadableLoader.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkFormDatacpp">trunk/Source/WebCore/platform/network/FormData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkFormDatah">trunk/Source/WebCore/platform/network/FormData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPHeaderMapcpp">trunk/Source/WebCore/platform/network/HTTPHeaderMap.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPHeaderMaph">trunk/Source/WebCore/platform/network/HTTPHeaderMap.h</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="#trunkSourceWebCoreplatformnetworkResourceLoadTimingh">trunk/Source/WebCore/platform/network/ResourceLoadTiming.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="#trunkSourceWebCoreplatformnetworkcfResourceErrorCFcpp">trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequesth">trunk/Source/WebCore/platform/network/cf/ResourceRequest.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequestCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseh">trunk/Source/WebCore/platform/network/cf/ResourceResponse.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlResourceErrorh">trunk/Source/WebCore/platform/network/curl/ResourceError.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlResourceRequesth">trunk/Source/WebCore/platform/network/curl/ResourceRequest.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlResourceResponseh">trunk/Source/WebCore/platform/network/curl/ResourceResponse.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceErrorMacmm">trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceErrorh">trunk/Source/WebCore/platform/network/soup/ResourceError.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceErrorSoupcpp">trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceRequesth">trunk/Source/WebCore/platform/network/soup/ResourceRequest.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceResponseh">trunk/Source/WebCore/platform/network/soup/ResourceResponse.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/ChangeLog        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -1,3 +1,93 @@
</span><ins>+2016-06-02 Brady Eidson <beidson@apple.com>
+
+ Modernize how many platform/network classes do isolatedCopy().
+ https://bugs.webkit.org/show_bug.cgi?id=158313
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Refactor, no behavior change).
+
+ * loader/WorkerThreadableLoader.h:
+
+ * platform/network/FormData.cpp:
+ (WebCore::FormData::isolatedCopy):
+ (WebCore::FormDataElement::isolatedCopy):
+ (WebCore::FormData::FormData): Deleted.
+ (WebCore::FormData::deepCopy): Deleted.
+ * platform/network/FormData.h:
+
+ * platform/network/HTTPHeaderMap.cpp:
+ (WebCore::HTTPHeaderMap::isolatedCopy):
+ (WebCore::HTTPHeaderMap::copyData): Deleted.
+ (WebCore::HTTPHeaderMap::adopt): Deleted.
+ * platform/network/HTTPHeaderMap.h:
+
+ * platform/network/ResourceErrorBase.cpp:
+ (WebCore::ResourceErrorBase::asResourceError):
+ (WebCore::ResourceErrorBase::isolatedCopy):
+ * platform/network/ResourceErrorBase.h:
+ (WebCore::ResourceErrorBase::platformCopy): Deleted.
+
+ * platform/network/ResourceLoadTiming.h:
+ (WebCore::ResourceLoadTiming::isolatedCopy): Not strictly needed for now, but makes it obvious
+ that changes will be needed if new members are added later.
+
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::isolatedCopy):
+ (WebCore::ResourceRequestBase::setAsIsolatedCopy):
+ (WebCore::ResourceRequestBase::copyData): Deleted.
+ * platform/network/ResourceRequestBase.h:
+
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::isolatedCopy):
+ (WebCore::ResourceResponseBase::copyData): Deleted.
+ * platform/network/ResourceResponseBase.h:
+ (WebCore::CrossThreadResourceResponseDataBase::CrossThreadResourceResponseDataBase): Deleted.
+
+ * platform/network/cf/ResourceError.h:
+ * platform/network/cf/ResourceErrorCF.cpp:
+ (WebCore::ResourceError::doPlatformIsolatedCopy):
+ (WebCore::ResourceError::platformCopy): Deleted.
+
+ * platform/network/cf/ResourceRequest.h:
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):
+ (WebCore::ResourceRequest::doPlatformCopyData): Deleted.
+ (WebCore::ResourceRequest::doPlatformAdopt): Deleted.
+
+ * platform/network/cf/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData): Deleted.
+ (WebCore::ResourceResponse::doPlatformAdopt): Deleted.
+
+ * platform/network/curl/ResourceError.h:
+ (WebCore::ResourceError::doPlatformIsolatedCopy):
+
+ * platform/network/curl/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):
+ (WebCore::ResourceRequest::doPlatformCopyData): Deleted.
+ (WebCore::ResourceRequest::doPlatformAdopt): Deleted.
+
+ * platform/network/curl/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData): Deleted.
+ (WebCore::ResourceResponse::doPlatformAdopt): Deleted.
+
+ * platform/network/mac/ResourceErrorMac.mm:
+ (WebCore::ResourceError::doPlatformIsolatedCopy):
+
+ * platform/network/soup/ResourceError.h:
+ * platform/network/soup/ResourceErrorSoup.cpp:
+ (WebCore::ResourceError::doPlatformIsolatedCopy):
+ (WebCore::ResourceError::platformCopy): Deleted.
+
+ * platform/network/soup/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):
+ (WebCore::ResourceRequest::doPlatformCopyData): Deleted.
+ (WebCore::ResourceRequest::doPlatformAdopt): Deleted.
+
+ * platform/network/soup/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData): Deleted.
+ (WebCore::ResourceResponse::doPlatformAdopt): Deleted.
+
</ins><span class="cx"> 2016-06-02 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Crash under CachedResource::addClientToSet()
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderWorkerThreadableLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/WorkerThreadableLoader.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -45,8 +45,6 @@
</span><span class="cx"> class ResourceRequest;
</span><span class="cx"> class WorkerGlobalScope;
</span><span class="cx"> class WorkerLoaderProxy;
</span><del>- struct CrossThreadResourceResponseData;
- struct CrossThreadResourceRequestData;
</del><span class="cx">
</span><span class="cx"> class WorkerThreadableLoader : public RefCounted<WorkerThreadableLoader>, public ThreadableLoader {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkFormDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/FormData.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/FormData.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/FormData.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -39,9 +39,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> inline FormData::FormData()
</span><del>- : m_identifier(0)
- , m_alwaysStream(false)
- , m_containsPasswordData(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -115,29 +112,34 @@
</span><span class="cx"> return adoptRef(*new FormData(*this));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<FormData> FormData::deepCopy() const
</del><ins>+Ref<FormData> FormData::isolatedCopy() const
</ins><span class="cx"> {
</span><del>- Ref<FormData> formData(create());
</del><ins>+ // FIXME: isolatedCopy() (historically deepCopy()) only copies certain values from `this`. Why is that?
+ auto formData = create();
</ins><span class="cx">
</span><span class="cx"> formData->m_alwaysStream = m_alwaysStream;
</span><span class="cx">
</span><span class="cx"> formData->m_elements.reserveInitialCapacity(m_elements.size());
</span><del>- for (const FormDataElement& element : m_elements) {
- switch (element.m_type) {
- case FormDataElement::Type::Data:
- formData->m_elements.uncheckedAppend(FormDataElement(element.m_data));
- break;
- case FormDataElement::Type::EncodedFile:
- formData->m_elements.uncheckedAppend(FormDataElement(element.m_filename, element.m_fileStart, element.m_fileLength, element.m_expectedFileModificationTime, element.m_shouldGenerateFile));
- break;
- case FormDataElement::Type::EncodedBlob:
- formData->m_elements.uncheckedAppend(FormDataElement(element.m_url));
- break;
- }
- }
</del><ins>+ for (auto& element : m_elements)
+ formData->m_elements.uncheckedAppend(element.isolatedCopy());
+
</ins><span class="cx"> return formData;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+FormDataElement FormDataElement::isolatedCopy() const
+{
+ switch (m_type) {
+ case Type::Data:
+ return FormDataElement(m_data);
+ case Type::EncodedFile:
+ return FormDataElement(m_filename.isolatedCopy(), m_fileStart, m_fileLength, m_expectedFileModificationTime, m_shouldGenerateFile);
+ case Type::EncodedBlob:
+ return FormDataElement(m_url.isolatedCopy());
+ }
+
+ RELEASE_ASSERT_NOT_REACHED();
+}
+
</ins><span class="cx"> void FormData::appendData(const void* data, size_t size)
</span><span class="cx"> {
</span><span class="cx"> memcpy(expandDataStore(size), data, size);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkFormDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/FormData.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/FormData.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/FormData.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -69,6 +69,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ FormDataElement isolatedCopy() const;
+
</ins><span class="cx"> template<typename Encoder>
</span><span class="cx"> void encode(Encoder&) const;
</span><span class="cx"> template<typename Decoder>
</span><span class="lines">@@ -205,7 +207,7 @@
</span><span class="cx"> // FIXME: Both these functions perform a deep copy of m_elements, but differ in handling of other data members.
</span><span class="cx"> // How much of that is intentional? We need better names that explain the difference.
</span><span class="cx"> Ref<FormData> copy() const;
</span><del>- Ref<FormData> deepCopy() const;
</del><ins>+ Ref<FormData> isolatedCopy() const;
</ins><span class="cx">
</span><span class="cx"> template<typename Encoder>
</span><span class="cx"> void encode(Encoder&) const;
</span><span class="lines">@@ -263,10 +265,10 @@
</span><span class="cx">
</span><span class="cx"> Vector<FormDataElement> m_elements;
</span><span class="cx">
</span><del>- int64_t m_identifier;
- bool m_alwaysStream;
</del><ins>+ int64_t m_identifier { 0 };
+ bool m_alwaysStream { false };
</ins><span class="cx"> Vector<char> m_boundary;
</span><del>- bool m_containsPasswordData;
</del><ins>+ bool m_containsPasswordData { false };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool operator==(const FormData& a, const FormData& b)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPHeaderMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/HTTPHeaderMap.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPHeaderMap.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderMap.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -44,33 +44,19 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-std::unique_ptr<CrossThreadHTTPHeaderMapData> HTTPHeaderMap::copyData() const
</del><ins>+HTTPHeaderMap HTTPHeaderMap::isolatedCopy() const
</ins><span class="cx"> {
</span><del>- auto data = std::make_unique<CrossThreadHTTPHeaderMapData>();
</del><ins>+ HTTPHeaderMap map;
</ins><span class="cx">
</span><del>- data->commonHeaders.reserveInitialCapacity(m_commonHeaders.size());
- for (const auto& header : m_commonHeaders)
- data->commonHeaders.uncheckedAppend(std::make_pair(header.key, header.value.isolatedCopy()));
</del><ins>+ for (auto& header : m_commonHeaders)
+ map.m_commonHeaders.set(header.key, header.value.isolatedCopy());
</ins><span class="cx">
</span><del>- data->uncommonHeaders.reserveInitialCapacity(m_uncommonHeaders.size());
- for (const auto& header : m_uncommonHeaders)
- data->uncommonHeaders.uncheckedAppend(std::make_pair(header.key.isolatedCopy(), header.value.isolatedCopy()));
</del><ins>+ for (auto& header : m_uncommonHeaders)
+ map.m_uncommonHeaders.set(header.key.isolatedCopy(), header.value.isolatedCopy());
</ins><span class="cx">
</span><del>- return data;
</del><ins>+ return map;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void HTTPHeaderMap::adopt(std::unique_ptr<CrossThreadHTTPHeaderMapData> data)
-{
- m_commonHeaders.clear();
- m_uncommonHeaders.clear();
-
- for (auto& header : data->commonHeaders)
- m_commonHeaders.add(header.first, WTFMove(header.second));
-
- for (auto& header : data->uncommonHeaders)
- m_uncommonHeaders.add(WTFMove(header.first), WTFMove(header.second));
-}
-
</del><span class="cx"> String HTTPHeaderMap::get(const String& name) const
</span><span class="cx"> {
</span><span class="cx"> HTTPHeaderName headerName;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPHeaderMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/HTTPHeaderMap.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPHeaderMap.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderMap.h        2016-06-02 22:43:25 UTC (rev 201623)
</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 HTTPHeaderMap_h
-#define HTTPHeaderMap_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "HTTPHeaderNames.h"
</span><span class="cx"> #include <utility>
</span><span class="lines">@@ -38,11 +37,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-struct CrossThreadHTTPHeaderMapData {
- Vector<std::pair<HTTPHeaderName, String>> commonHeaders;
- Vector<std::pair<String, String>> uncommonHeaders;
-};
-
</del><span class="cx"> // FIXME: Not every header fits into a map. Notably, multiple Set-Cookie header fields are needed to set multiple cookies.
</span><span class="cx">
</span><span class="cx"> class HTTPHeaderMap {
</span><span class="lines">@@ -124,8 +118,7 @@
</span><span class="cx"> WEBCORE_EXPORT ~HTTPHeaderMap();
</span><span class="cx">
</span><span class="cx"> // Gets a copy of the data suitable for passing to another thread.
</span><del>- std::unique_ptr<CrossThreadHTTPHeaderMapData> copyData() const;
- void adopt(std::unique_ptr<CrossThreadHTTPHeaderMapData>);
</del><ins>+ HTTPHeaderMap isolatedCopy() const;
</ins><span class="cx">
</span><span class="cx"> bool isEmpty() const { return m_commonHeaders.isEmpty() && m_uncommonHeaders.isEmpty(); }
</span><span class="cx"> int size() const { return m_commonHeaders.size() + m_uncommonHeaders.size(); }
</span><span class="lines">@@ -215,5 +208,3 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // HTTPHeaderMap_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceErrorBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceErrorBase.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -31,6 +31,11 @@
</span><span class="cx">
</span><span class="cx"> const char* const errorDomainWebKitInternal = "WebKitInternal";
</span><span class="cx">
</span><ins>+inline const ResourceError& ResourceErrorBase::asResourceError() const
+{
+ return *static_cast<const ResourceError*>(this);
+}
+
</ins><span class="cx"> ResourceError ResourceErrorBase::isolatedCopy() const
</span><span class="cx"> {
</span><span class="cx"> lazyInit();
</span><span class="lines">@@ -43,7 +48,9 @@
</span><span class="cx"> errorCopy.m_isNull = m_isNull;
</span><span class="cx"> errorCopy.m_isCancellation = m_isCancellation;
</span><span class="cx"> errorCopy.m_isTimeout = m_isTimeout;
</span><del>- platformCopy(errorCopy);
</del><ins>+
+ errorCopy.doPlatformIsolatedCopy(asResourceError());
+
</ins><span class="cx"> return errorCopy;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceErrorBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceErrorBase.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceErrorBase.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceErrorBase.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -78,9 +78,6 @@
</span><span class="cx"> // The ResourceError subclass may "shadow" this method to lazily initialize platform specific fields
</span><span class="cx"> void platformLazyInit() {}
</span><span class="cx">
</span><del>- // The ResourceError subclass may "shadow" this method to copy platform specific fields
- void platformCopy(ResourceError&) const {}
-
</del><span class="cx"> // The ResourceError subclass may "shadow" this method to compare platform specific fields
</span><span class="cx"> static bool platformCompare(const ResourceError&, const ResourceError&) { return true; }
</span><span class="cx">
</span><span class="lines">@@ -91,6 +88,9 @@
</span><span class="cx"> bool m_isNull : 1;
</span><span class="cx"> bool m_isCancellation : 1;
</span><span class="cx"> bool m_isTimeout : 1;
</span><ins>+
+private:
+ const ResourceError& asResourceError() const;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool operator==(const ResourceError& a, const ResourceError& b) { return ResourceErrorBase::compare(a, b); }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceLoadTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceLoadTiming.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceLoadTiming.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceLoadTiming.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -68,6 +68,12 @@
</span><span class="cx"> secureConnectionStart = other.secureConnectionStart;
</span><span class="cx"> return *this;
</span><span class="cx"> }
</span><ins>+
+ ResourceLoadTiming isolatedCopy() const
+ {
+ // There are currently no members that need isolated copies, so we can use the copy constructor.
+ return *this;
+ }
</ins><span class="cx">
</span><span class="cx"> bool operator==(const ResourceLoadTiming& other) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -52,67 +52,43 @@
</span><span class="cx"> ResourceRequest ResourceRequestBase::isolatedCopy() const
</span><span class="cx"> {
</span><span class="cx"> ResourceRequest request;
</span><del>- request.setAsIsolatedCopy(*this);
</del><ins>+ request.setAsIsolatedCopy(asResourceRequest());
</ins><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ResourceRequestBase::setAsIsolatedCopy(const ResourceRequestBase& other)
</del><ins>+void ResourceRequestBase::setAsIsolatedCopy(const ResourceRequest& other)
</ins><span class="cx"> {
</span><del>- auto data = other.copyData();
</del><ins>+ setURL(other.url().isolatedCopy());
+ setCachePolicy(other.cachePolicy());
+ setTimeoutInterval(other.timeoutInterval());
+ setFirstPartyForCookies(other.firstPartyForCookies().isolatedCopy());
+ setHTTPMethod(other.httpMethod().isolatedCopy());
+ setPriority(other.priority());
+ setRequester(other.requester());
</ins><span class="cx">
</span><del>- setURL(data->url);
- setCachePolicy(data->cachePolicy);
- setTimeoutInterval(data->timeoutInterval);
- setFirstPartyForCookies(data->firstPartyForCookies);
- setHTTPMethod(data->httpMethod);
- setPriority(data->priority);
- setRequester(data->requester);
-
</del><span class="cx"> updateResourceRequest();
</span><del>- m_httpHeaderFields.adopt(WTFMove(data->httpHeaders));
</del><ins>+ m_httpHeaderFields = other.httpHeaderFields().isolatedCopy();
</ins><span class="cx">
</span><del>- size_t encodingCount = data->responseContentDispositionEncodingFallbackArray.size();
</del><ins>+ size_t encodingCount = other.m_responseContentDispositionEncodingFallbackArray.size();
</ins><span class="cx"> if (encodingCount > 0) {
</span><del>- String encoding1 = data->responseContentDispositionEncodingFallbackArray[0];
</del><ins>+ String encoding1 = other.m_responseContentDispositionEncodingFallbackArray[0].isolatedCopy();
</ins><span class="cx"> String encoding2;
</span><span class="cx"> String encoding3;
</span><span class="cx"> if (encodingCount > 1) {
</span><del>- encoding2 = data->responseContentDispositionEncodingFallbackArray[1];
</del><ins>+ encoding2 = other.m_responseContentDispositionEncodingFallbackArray[1].isolatedCopy();
</ins><span class="cx"> if (encodingCount > 2)
</span><del>- encoding3 = data->responseContentDispositionEncodingFallbackArray[2];
</del><ins>+ encoding3 = other.m_responseContentDispositionEncodingFallbackArray[2].isolatedCopy();
</ins><span class="cx"> }
</span><span class="cx"> ASSERT(encodingCount <= 3);
</span><span class="cx"> setResponseContentDispositionEncodingFallbackArray(encoding1, encoding2, encoding3);
</span><span class="cx"> }
</span><del>- setHTTPBody(data->httpBody.copyRef());
- setAllowCookies(data->allowCookies);
</del><ins>+ if (other.m_httpBody)
+ setHTTPBody(other.m_httpBody->isolatedCopy());
+ setAllowCookies(other.m_allowCookies);
</ins><span class="cx">
</span><del>- const_cast<ResourceRequest&>(asResourceRequest()).doPlatformAdopt(WTFMove(data));
</del><ins>+ const_cast<ResourceRequest&>(asResourceRequest()).doPlatformSetAsIsolatedCopy(other);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-std::unique_ptr<CrossThreadResourceRequestData> ResourceRequestBase::copyData() const
-{
- auto data = std::make_unique<CrossThreadResourceRequestData>();
- data->url = url().isolatedCopy();
- data->cachePolicy = m_cachePolicy;
- data->timeoutInterval = timeoutInterval();
- data->firstPartyForCookies = firstPartyForCookies().isolatedCopy();
- data->httpMethod = httpMethod().isolatedCopy();
- data->httpHeaders = httpHeaderFields().copyData();
- data->priority = m_priority;
- data->requester = m_requester;
-
- data->responseContentDispositionEncodingFallbackArray.reserveInitialCapacity(m_responseContentDispositionEncodingFallbackArray.size());
- size_t encodingArraySize = m_responseContentDispositionEncodingFallbackArray.size();
- for (size_t index = 0; index < encodingArraySize; ++index) {
- data->responseContentDispositionEncodingFallbackArray.append(m_responseContentDispositionEncodingFallbackArray[index].isolatedCopy());
- }
- if (m_httpBody)
- data->httpBody = m_httpBody->deepCopy();
- data->allowCookies = m_allowCookies;
- return asResourceRequest().doPlatformCopyData(WTFMove(data));
-}
-
</del><span class="cx"> bool ResourceRequestBase::isEmpty() const
</span><span class="cx"> {
</span><span class="cx"> updateResourceRequest();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -48,14 +48,13 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ResourceRequest;
</span><del>-struct CrossThreadResourceRequestData;
</del><span class="cx">
</span><span class="cx"> // Do not use this type directly. Use ResourceRequest instead.
</span><span class="cx"> class ResourceRequestBase {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx"> ResourceRequest isolatedCopy() const;
</span><del>- WEBCORE_EXPORT void setAsIsolatedCopy(const ResourceRequestBase&);
</del><ins>+ WEBCORE_EXPORT void setAsIsolatedCopy(const ResourceRequest&);
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool isNull() const;
</span><span class="cx"> WEBCORE_EXPORT bool isEmpty() const;
</span><span class="lines">@@ -220,9 +219,6 @@
</span><span class="cx"> private:
</span><span class="cx"> const ResourceRequest& asResourceRequest() const;
</span><span class="cx">
</span><del>- // Gets a copy of the data suitable for passing to another thread.
- std::unique_ptr<CrossThreadResourceRequestData> copyData() const;
-
</del><span class="cx"> WEBCORE_EXPORT static double s_defaultTimeoutInterval;
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> static bool s_defaultAllowCookies;
</span><span class="lines">@@ -234,20 +230,6 @@
</span><span class="cx"> inline bool operator==(const ResourceRequest& a, const ResourceRequest& b) { return ResourceRequestBase::compare(a, b); }
</span><span class="cx"> inline bool operator!=(ResourceRequest& a, const ResourceRequest& b) { return !(a == b); }
</span><span class="cx">
</span><del>-struct CrossThreadResourceRequestDataBase {
- URL url;
- ResourceRequestCachePolicy cachePolicy;
- double timeoutInterval;
- URL firstPartyForCookies;
- String httpMethod;
- std::unique_ptr<CrossThreadHTTPHeaderMapData> httpHeaders;
- Vector<String> responseContentDispositionEncodingFallbackArray;
- RefPtr<FormData> httpBody;
- bool allowCookies;
- ResourceLoadPriority priority;
- ResourceRequestBase::Requester requester;
-};
-
</del><span class="cx"> WEBCORE_EXPORT unsigned initializeMaximumHTTPConnectionCountPerHost();
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> WEBCORE_EXPORT void initializeHTTPConnectionSettingsOnStartup();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -66,42 +66,24 @@
</span><span class="cx"> ResourceResponse ResourceResponseBase::isolatedCopy() const
</span><span class="cx"> {
</span><span class="cx"> ResourceResponse response;
</span><del>- auto data = copyData();
</del><span class="cx">
</span><del>- response.setURL(data->m_url);
- response.setMimeType(data->m_mimeType);
- response.setExpectedContentLength(data->m_expectedContentLength);
- response.setTextEncodingName(data->m_textEncodingName);
</del><ins>+ response.setURL(url().isolatedCopy());
+ response.setMimeType(mimeType().isolatedCopy());
+ response.setExpectedContentLength(expectedContentLength());
+ response.setTextEncodingName(textEncodingName().isolatedCopy());
</ins><span class="cx">
</span><del>- response.setHTTPStatusCode(data->m_httpStatusCode);
- response.setHTTPStatusText(data->m_httpStatusText);
- response.setHTTPVersion(data->m_httpVersion);
</del><ins>+ response.setHTTPStatusCode(httpStatusCode());
+ response.setHTTPStatusText(httpStatusText().isolatedCopy());
+ response.setHTTPVersion(httpVersion().isolatedCopy());
</ins><span class="cx">
</span><span class="cx"> response.lazyInit(AllFields);
</span><del>- response.m_httpHeaderFields.adopt(WTFMove(data->m_httpHeaders));
- response.m_resourceLoadTiming = data->m_resourceLoadTiming;
- response.m_type = data->m_type;
- response.doPlatformAdopt(WTFMove(data));
</del><ins>+ response.m_httpHeaderFields = httpHeaderFields().isolatedCopy();
+ response.m_resourceLoadTiming = m_resourceLoadTiming.isolatedCopy();
+ response.m_type = m_type;
</ins><span class="cx">
</span><span class="cx"> return response;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-std::unique_ptr<CrossThreadResourceResponseData> ResourceResponseBase::copyData() const
-{
- auto data = std::make_unique<CrossThreadResourceResponseData>();
- data->m_url = url().isolatedCopy();
- data->m_mimeType = mimeType().isolatedCopy();
- data->m_expectedContentLength = expectedContentLength();
- data->m_textEncodingName = textEncodingName().isolatedCopy();
- data->m_httpStatusCode = httpStatusCode();
- data->m_httpStatusText = httpStatusText().isolatedCopy();
- data->m_httpVersion = httpVersion().isolatedCopy();
- data->m_httpHeaders = httpHeaderFields().copyData();
- data->m_resourceLoadTiming = m_resourceLoadTiming;
- data->m_type = m_type;
- return asResourceResponse().doPlatformCopyData(WTFMove(data));
-}
-
</del><span class="cx"> // FIXME: Name does not make it clear this is true for HTTPS!
</span><span class="cx"> bool ResourceResponseBase::isHTTP() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceResponseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceResponseBase.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/ResourceResponseBase.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class ResourceResponse;
</span><del>-struct CrossThreadResourceResponseData;
</del><span class="cx">
</span><span class="cx"> // Do not use this class directly, use the class ResponseResponse instead
</span><span class="cx"> class ResourceResponseBase {
</span><span class="lines">@@ -159,9 +158,6 @@
</span><span class="cx"> void parseCacheControlDirectives() const;
</span><span class="cx"> void updateHeaderParsedState(HTTPHeaderName);
</span><span class="cx">
</span><del>- // Gets a copy of the data suitable for passing to another thread.
- std::unique_ptr<CrossThreadResourceResponseData> copyData() const;
-
</del><span class="cx"> protected:
</span><span class="cx"> bool m_isNull;
</span><span class="cx"> URL m_url;
</span><span class="lines">@@ -274,21 +270,4 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-struct CrossThreadResourceResponseDataBase {
- WTF_MAKE_NONCOPYABLE(CrossThreadResourceResponseDataBase); WTF_MAKE_FAST_ALLOCATED;
-public:
- CrossThreadResourceResponseDataBase() { }
- URL m_url;
- String m_mimeType;
- long long m_expectedContentLength;
- String m_textEncodingName;
- int m_httpStatusCode;
- String m_httpStatusText;
- String m_httpVersion;
- std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders;
- ResourceLoadTiming m_resourceLoadTiming;
- ResourceResponseBase::Type m_type;
- bool m_isRedirected;
-};
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceError.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceError.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/cf/ResourceError.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -83,7 +83,9 @@
</span><span class="cx"> friend class ResourceErrorBase;
</span><span class="cx">
</span><span class="cx"> void platformLazyInit();
</span><del>- void platformCopy(ResourceError&) const;
</del><ins>+
+ void doPlatformIsolatedCopy(const ResourceError&);
+
</ins><span class="cx"> bool m_dataIsUpToDate;
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> mutable RetainPtr<CFErrorRef> m_platformError;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceErrorCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -119,12 +119,13 @@
</span><span class="cx"> m_dataIsUpToDate = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ResourceError::platformCopy(ResourceError& errorCopy) const
</del><ins>+
+void ResourceError::doPlatformIsolatedCopy(const ResourceError& other)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>- errorCopy.m_certificate = m_certificate;
</del><ins>+ m_certificate = other.m_certificate;
</ins><span class="cx"> #else
</span><del>- UNUSED_PARAM(errorCopy);
</del><ins>+ UNUSED_PARAM(other);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequest.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -126,8 +126,7 @@
</span><span class="cx"> void doUpdatePlatformHTTPBody();
</span><span class="cx"> void doUpdateResourceHTTPBody();
</span><span class="cx">
</span><del>- std::unique_ptr<CrossThreadResourceRequestData> doPlatformCopyData(std::unique_ptr<CrossThreadResourceRequestData>) const;
- void doPlatformAdopt(std::unique_ptr<CrossThreadResourceRequestData>);
</del><ins>+ void doPlatformSetAsIsolatedCopy(const ResourceRequest&);
</ins><span class="cx">
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> RetainPtr<CFURLRequestRef> m_cfRequest;
</span><span class="lines">@@ -142,12 +141,6 @@
</span><span class="cx"> static bool s_httpPipeliningEnabled;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
-#if ENABLE(CACHE_PARTITIONING)
- String m_cachePartition;
-#endif
-};
-
</del><span class="cx"> inline bool ResourceRequest::resourcePrioritiesEnabled()
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequestCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -366,23 +366,16 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-std::unique_ptr<CrossThreadResourceRequestData> ResourceRequest::doPlatformCopyData(std::unique_ptr<CrossThreadResourceRequestData> data) const
</del><ins>+void ResourceRequest::doPlatformSetAsIsolatedCopy(const ResourceRequest& other)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><del>- data->m_cachePartition = m_cachePartition;
-#endif
- return data;
-}
-
-void ResourceRequest::doPlatformAdopt(std::unique_ptr<CrossThreadResourceRequestData> data)
-{
-#if ENABLE(CACHE_PARTITIONING)
- m_cachePartition = data->m_cachePartition;
</del><ins>+ m_cachePartition = other.m_cachePartition.isolatedCopy();
</ins><span class="cx"> #else
</span><del>- UNUSED_PARAM(data);
</del><ins>+ UNUSED_PARAM(other);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> // FIXME: It is confusing that this function both sets connection count and determines maximum request count at network layer. This can and should be done separately.
</span><span class="cx"> unsigned initializeMaximumHTTPConnectionCountPerHost()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponse.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -100,8 +100,8 @@
</span><span class="cx"> String platformSuggestedFilename() const;
</span><span class="cx"> CertificateInfo platformCertificateInfo() const;
</span><span class="cx">
</span><del>- std::unique_ptr<CrossThreadResourceResponseData> doPlatformCopyData(std::unique_ptr<CrossThreadResourceResponseData> data) const { return data; }
- void doPlatformAdopt(std::unique_ptr<CrossThreadResourceResponseData>) { }
</del><ins>+ void doPlatformSetAsIsolatedCopy(const ResourceResponse&) const;
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> void initNSURLResponse() const;
</span><span class="cx"> #endif
</span><span class="lines">@@ -119,7 +119,4 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><del>-struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
-};
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlResourceErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/ResourceError.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/ResourceError.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/curl/ResourceError.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -54,6 +54,9 @@
</span><span class="cx"> bool hasSSLConnectError() const { return errorCode() == CURLE_SSL_CONNECT_ERROR; }
</span><span class="cx">
</span><span class="cx"> private:
</span><ins>+ friend class ResourceErrorBase;
+ void doPlatformIsolatedCopy(const ResourceError&) { }
+
</ins><span class="cx"> unsigned m_sslErrors;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/ResourceRequest.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/ResourceRequest.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/curl/ResourceRequest.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -78,15 +78,11 @@
</span><span class="cx"> void doUpdatePlatformHTTPBody() { }
</span><span class="cx"> void doUpdateResourceHTTPBody() { }
</span><span class="cx">
</span><del>- std::unique_ptr<CrossThreadResourceRequestData> doPlatformCopyData(std::unique_ptr<CrossThreadResourceRequestData> data) const { return data; }
- void doPlatformAdopt(std::unique_ptr<CrossThreadResourceRequestData>) { }
-
</del><ins>+ void doPlatformSetAsIsolatedCopy(const ResourceRequest&) { }
+
</ins><span class="cx"> static bool s_httpPipeliningEnabled;
</span><span class="cx"> };
</span><span class="cx">
</span><del>- struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
- };
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ResourceRequest_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/ResourceResponse.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/ResourceResponse.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/curl/ResourceResponse.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -59,8 +59,6 @@
</span><span class="cx"> private:
</span><span class="cx"> friend class ResourceResponseBase;
</span><span class="cx">
</span><del>- std::unique_ptr<CrossThreadResourceResponseData> doPlatformCopyData(std::unique_ptr<CrossThreadResourceResponseData> data) const { return data; }
- void doPlatformAdopt(std::unique_ptr<CrossThreadResourceResponseData>) { }
</del><span class="cx"> String platformSuggestedFilename() const
</span><span class="cx"> {
</span><span class="cx"> return filenameFromHTTPContentDisposition(httpHeaderField(HTTPHeaderName::ContentDisposition));
</span><span class="lines">@@ -69,9 +67,6 @@
</span><span class="cx"> bool m_responseFired;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
-};
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ResourceResponse_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceErrorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -281,6 +281,10 @@
</span><span class="cx"> return a.nsError() == b.nsError();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void ResourceError::doPlatformIsolatedCopy(const ResourceError&)
+{
+}
+
</ins><span class="cx"> NSError *ResourceError::nsError() const
</span><span class="cx"> {
</span><span class="cx"> if (m_isNull) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceError.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceError.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/soup/ResourceError.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -67,7 +67,8 @@
</span><span class="cx"> static bool platformCompare(const ResourceError& a, const ResourceError& b);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- void platformCopy(ResourceError&) const;
</del><ins>+ friend class ResourceErrorBase;
+ void doPlatformIsolatedCopy(const ResourceError&);
</ins><span class="cx">
</span><span class="cx"> unsigned m_tlsErrors;
</span><span class="cx"> GRefPtr<GTlsCertificate> m_certificate;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceErrorSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -97,10 +97,10 @@
</span><span class="cx"> return error;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ResourceError::platformCopy(ResourceError& errorCopy) const
</del><ins>+void ResourceError::doPlatformIsolatedCopy(const ResourceError& other)
</ins><span class="cx"> {
</span><del>- errorCopy.m_certificate = m_certificate;
- errorCopy.m_tlsErrors = m_tlsErrors;
</del><ins>+ m_certificate = other.m_certificate;
+ m_tlsErrors = other.m_tlsErrors;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ResourceError::platformCompare(const ResourceError& a, const ResourceError& b)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceRequest.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceRequest.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/soup/ResourceRequest.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -120,13 +120,9 @@
</span><span class="cx"> void doUpdatePlatformHTTPBody() { }
</span><span class="cx"> void doUpdateResourceHTTPBody() { }
</span><span class="cx">
</span><del>- std::unique_ptr<CrossThreadResourceRequestData> doPlatformCopyData(std::unique_ptr<CrossThreadResourceRequestData> data) const { return data; }
- void doPlatformAdopt(std::unique_ptr<CrossThreadResourceRequestData>) { }
</del><ins>+ void doPlatformSetAsIsolatedCopy(const ResourceRequest&) { }
</ins><span class="cx"> };
</span><span class="cx">
</span><del>- struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
- };
-
</del><span class="cx"> #if SOUP_CHECK_VERSION(2, 43, 1)
</span><span class="cx"> inline SoupMessagePriority toSoupMessagePriority(ResourceLoadPriority priority)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceResponse.h (201622 => 201623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceResponse.h        2016-06-02 22:18:27 UTC (rev 201622)
+++ trunk/Source/WebCore/platform/network/soup/ResourceResponse.h        2016-06-02 22:43:25 UTC (rev 201623)
</span><span class="lines">@@ -90,9 +90,6 @@
</span><span class="cx"> void doUpdateResourceResponse() { }
</span><span class="cx"> String platformSuggestedFilename() const;
</span><span class="cx"> CertificateInfo platformCertificateInfo() const;
</span><del>-
- std::unique_ptr<CrossThreadResourceResponseData> doPlatformCopyData(std::unique_ptr<CrossThreadResourceResponseData> data) const { return data; }
- void doPlatformAdopt(std::unique_ptr<CrossThreadResourceResponseData>) { }
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<class Encoder>
</span><span class="lines">@@ -112,9 +109,6 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
-};
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ResourceResponse_h
</span></span></pre>
</div>
</div>
</body>
</html>