[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:57:02 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit bcba8d88391d391ca57be20fc0edce8cdfc6761b
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 30 07:48:41 2010 +0000
2010-09-30 Michael Nordman <michaeln at google.com>
Reviewed by David Levin.
Make it possible to copy platform specific data members of ResourceRequest and ResourceResponse
across threads and to compare platform specific data members of ResourceRequest.
- Added two instance methods to the platform specific subclasses: doPlatformAdopt and doPlatformCopyData.
- Also added a "shadowable" static method for platformCompare to ResourceRequestBase, a similar method
is already present on ResourceResponseBase.
- Converted the cross thread structs defined in ResourceRequest/ResponseBase.h to base
classes and extended those base classes in the platform specific headers to provide a place
to hold additional fields.
- Used this mechanism to have the chromium port's data members make the hop.
https://bugs.webkit.org/show_bug.cgi?id=46430
No new tests. Just plumbing.
* WebCore.exp.in: removed the symbol for the now inlined == operator
* WebCore.gypi: added chromium/ResourceResponse.cpp
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::copyData):
(WebCore::ResourceRequestBase::compare):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::platformCompare):
(WebCore::operator==):
(WebCore::operator!=):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::asResourceResponse):
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
* platform/network/ResourceResponseBase.h:
* platform/network/android/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/android/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/chromium/ResourceRequest.cpp:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/chromium/ResourceRequest.h:
* platform/network/chromium/ResourceResponse.cpp: Added.
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/chromium/ResourceResponse.h:
* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/curl/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/mac/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/mac/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/qt/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/qt/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::doUpdateResourceResponse):
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fc72ccc..898bf65 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,81 @@
+2010-09-30 Michael Nordman <michaeln at google.com>
+
+ Reviewed by David Levin.
+
+ Make it possible to copy platform specific data members of ResourceRequest and ResourceResponse
+ across threads and to compare platform specific data members of ResourceRequest.
+ - Added two instance methods to the platform specific subclasses: doPlatformAdopt and doPlatformCopyData.
+ - Also added a "shadowable" static method for platformCompare to ResourceRequestBase, a similar method
+ is already present on ResourceResponseBase.
+ - Converted the cross thread structs defined in ResourceRequest/ResponseBase.h to base
+ classes and extended those base classes in the platform specific headers to provide a place
+ to hold additional fields.
+ - Used this mechanism to have the chromium port's data members make the hop.
+ https://bugs.webkit.org/show_bug.cgi?id=46430
+
+ No new tests. Just plumbing.
+
+ * WebCore.exp.in: removed the symbol for the now inlined == operator
+ * WebCore.gypi: added chromium/ResourceResponse.cpp
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::ResourceRequestBase::adopt):
+ (WebCore::ResourceRequestBase::copyData):
+ (WebCore::ResourceRequestBase::compare):
+ * platform/network/ResourceRequestBase.h:
+ (WebCore::ResourceRequestBase::platformCompare):
+ (WebCore::operator==):
+ (WebCore::operator!=):
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::asResourceResponse):
+ (WebCore::ResourceResponseBase::adopt):
+ (WebCore::ResourceResponseBase::copyData):
+ * platform/network/ResourceResponseBase.h:
+ * platform/network/android/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/android/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+ * platform/network/cf/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/cf/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+ * platform/network/chromium/ResourceRequest.cpp:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/chromium/ResourceRequest.h:
+ * platform/network/chromium/ResourceResponse.cpp: Added.
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+ * platform/network/chromium/ResourceResponse.h:
+ * platform/network/curl/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/curl/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+ * platform/network/mac/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/mac/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+ * platform/network/qt/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/qt/ResourceResponse.h:
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+ * platform/network/soup/ResourceRequest.h:
+ (WebCore::ResourceRequest::doPlatformCopyData):
+ (WebCore::ResourceRequest::doPlatformAdopt):
+ * platform/network/soup/ResourceResponse.h:
+ (WebCore::ResourceResponse::doUpdateResourceResponse):
+ (WebCore::ResourceResponse::doPlatformCopyData):
+ (WebCore::ResourceResponse::doPlatformAdopt):
+
2010-09-29 Chris Rogers <crogers at google.com>
Reviewed by Kenneth Russell.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 5d789dc..1f71d00 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -852,7 +852,6 @@ __ZN7WebCore9fontCacheEv
__ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
__ZN7WebCore9pageCacheEv
__ZN7WebCore9toElementEN3JSC7JSValueE
-__ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_
__ZNK3JSC8Bindings10RootObject12globalObjectEv
__ZNK3WTF6String14createCFStringEv
__ZNK7WebCore10FloatPointcv8_NSPointEv
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 8e6af6b..4c960d3 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -2905,6 +2905,7 @@
'platform/network/chromium/ResourceError.h',
'platform/network/chromium/ResourceRequest.cpp',
'platform/network/chromium/ResourceRequest.h',
+ 'platform/network/chromium/ResourceResponse.cpp',
'platform/network/chromium/ResourceResponse.h',
'platform/network/chromium/SocketStreamError.h',
'platform/network/chromium/SocketStreamHandle.h',
diff --git a/WebCore/platform/network/ResourceRequestBase.cpp b/WebCore/platform/network/ResourceRequestBase.cpp
index fd8832f..5312007 100644
--- a/WebCore/platform/network/ResourceRequestBase.cpp
+++ b/WebCore/platform/network/ResourceRequestBase.cpp
@@ -65,6 +65,7 @@ PassOwnPtr<ResourceRequest> ResourceRequestBase::adopt(PassOwnPtr<CrossThreadRes
}
request->setHTTPBody(data->m_httpBody);
request->setAllowCookies(data->m_allowCookies);
+ request->doPlatformAdopt(data);
return request.release();
}
@@ -87,7 +88,7 @@ PassOwnPtr<CrossThreadResourceRequestData> ResourceRequestBase::copyData() const
if (m_httpBody)
data->m_httpBody = m_httpBody->deepCopy();
data->m_allowCookies = m_allowCookies;
- return data.release();
+ return asResourceRequest().doPlatformCopyData(data.release());
}
bool ResourceRequestBase::isEmpty() const
@@ -355,7 +356,7 @@ bool equalIgnoringHeaderFields(const ResourceRequestBase& a, const ResourceReque
return true;
}
-bool operator==(const ResourceRequestBase& a, const ResourceRequestBase& b)
+bool ResourceRequestBase::compare(const ResourceRequest& a, const ResourceRequest& b)
{
if (!equalIgnoringHeaderFields(a, b))
return false;
@@ -363,7 +364,7 @@ bool operator==(const ResourceRequestBase& a, const ResourceRequestBase& b)
if (a.httpHeaderFields() != b.httpHeaderFields())
return false;
- return true;
+ return ResourceRequest::platformCompare(a, b);
}
bool ResourceRequestBase::isConditional() const
diff --git a/WebCore/platform/network/ResourceRequestBase.h b/WebCore/platform/network/ResourceRequestBase.h
index 1622cdd..a8aa185 100644
--- a/WebCore/platform/network/ResourceRequestBase.h
+++ b/WebCore/platform/network/ResourceRequestBase.h
@@ -140,6 +140,8 @@ namespace WebCore {
TargetType targetType() const { return m_targetType; }
void setTargetType(TargetType type) { m_targetType = type; }
+ static bool compare(const ResourceRequest&, const ResourceRequest&);
+
protected:
// Used when ResourceRequest is initialized from a platform representation of the request
ResourceRequestBase()
@@ -168,6 +170,9 @@ namespace WebCore {
void updatePlatformRequest() const;
void updateResourceRequest() const;
+ // The ResourceRequest subclass may "shadow" this method to compare platform specific fields
+ static bool platformCompare(const ResourceRequest&, const ResourceRequest&) { return true; }
+
KURL m_url;
ResourceRequestCachePolicy m_cachePolicy;
@@ -190,10 +195,10 @@ namespace WebCore {
bool equalIgnoringHeaderFields(const ResourceRequestBase&, const ResourceRequestBase&);
- bool operator==(const ResourceRequestBase&, const ResourceRequestBase&);
- inline bool operator!=(ResourceRequestBase& a, const ResourceRequestBase& b) { return !(a == b); }
+ inline bool operator==(const ResourceRequest& a, const ResourceRequest& b) { return ResourceRequestBase::compare(a, b); }
+ inline bool operator!=(ResourceRequest& a, const ResourceRequest& b) { return !(a == b); }
- struct CrossThreadResourceRequestData : Noncopyable {
+ struct CrossThreadResourceRequestDataBase : Noncopyable {
KURL m_url;
ResourceRequestCachePolicy m_cachePolicy;
diff --git a/WebCore/platform/network/ResourceResponseBase.cpp b/WebCore/platform/network/ResourceResponseBase.cpp
index e231652..48984d3 100644
--- a/WebCore/platform/network/ResourceResponseBase.cpp
+++ b/WebCore/platform/network/ResourceResponseBase.cpp
@@ -39,6 +39,11 @@ namespace WebCore {
static void parseCacheHeader(const String& header, Vector<pair<String, String> >& result);
+inline const ResourceResponse& ResourceResponseBase::asResourceResponse() const
+{
+ return *static_cast<const ResourceResponse*>(this);
+}
+
ResourceResponseBase::ResourceResponseBase()
: m_expectedContentLength(0)
, m_httpStatusCode(0)
@@ -107,7 +112,7 @@ PassOwnPtr<ResourceResponse> ResourceResponseBase::adopt(PassOwnPtr<CrossThreadR
response->m_httpHeaderFields.adopt(data->m_httpHeaders.release());
response->setLastModifiedDate(data->m_lastModifiedDate);
response->setResourceLoadTiming(data->m_resourceLoadTiming.release());
-
+ response->doPlatformAdopt(data);
return response.release();
}
@@ -125,7 +130,7 @@ PassOwnPtr<CrossThreadResourceResponseData> ResourceResponseBase::copyData() con
data->m_lastModifiedDate = lastModifiedDate();
if (m_resourceLoadTiming)
data->m_resourceLoadTiming = m_resourceLoadTiming->deepCopy();
- return data.release();
+ return asResourceResponse().doPlatformCopyData(data.release());
}
bool ResourceResponseBase::isHTTP() const
diff --git a/WebCore/platform/network/ResourceResponseBase.h b/WebCore/platform/network/ResourceResponseBase.h
index 65e24ad..df93886 100644
--- a/WebCore/platform/network/ResourceResponseBase.h
+++ b/WebCore/platform/network/ResourceResponseBase.h
@@ -116,7 +116,7 @@ public:
return 1280;
}
- static bool compare(const ResourceResponse& a, const ResourceResponse& b);
+ static bool compare(const ResourceResponse&, const ResourceResponse&);
protected:
ResourceResponseBase();
@@ -147,6 +147,7 @@ protected:
bool m_isNull : 1;
private:
+ const ResourceResponse& asResourceResponse() const;
void parseCacheControlDirectives() const;
mutable bool m_haveParsedCacheControlHeader : 1;
@@ -169,7 +170,7 @@ private:
inline bool operator==(const ResourceResponse& a, const ResourceResponse& b) { return ResourceResponseBase::compare(a, b); }
inline bool operator!=(const ResourceResponse& a, const ResourceResponse& b) { return !(a == b); }
-struct CrossThreadResourceResponseData : Noncopyable {
+struct CrossThreadResourceResponseDataBase : Noncopyable {
KURL m_url;
String m_mimeType;
long long m_expectedContentLength;
diff --git a/WebCore/platform/network/android/ResourceRequest.h b/WebCore/platform/network/android/ResourceRequest.h
index 1edd4bf..745c2ef 100644
--- a/WebCore/platform/network/android/ResourceRequest.h
+++ b/WebCore/platform/network/android/ResourceRequest.h
@@ -53,6 +53,12 @@ public:
private:
friend class ResourceRequestBase;
+
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>) { }
+};
+
+struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
};
} // namespace WebCore
diff --git a/WebCore/platform/network/android/ResourceResponse.h b/WebCore/platform/network/android/ResourceResponse.h
index e6ae2cc..78307b9 100644
--- a/WebCore/platform/network/android/ResourceResponse.h
+++ b/WebCore/platform/network/android/ResourceResponse.h
@@ -46,6 +46,12 @@ private:
{
notImplemented();
}
+
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
+};
+
+struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
};
} // namespace WebCore
diff --git a/WebCore/platform/network/cf/ResourceRequest.h b/WebCore/platform/network/cf/ResourceRequest.h
index e361af5..9ed79f2 100644
--- a/WebCore/platform/network/cf/ResourceRequest.h
+++ b/WebCore/platform/network/cf/ResourceRequest.h
@@ -68,10 +68,16 @@ namespace WebCore {
void doUpdatePlatformRequest();
void doUpdateResourceRequest();
-
+
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>) { }
+
RetainPtr<CFURLRequestRef> m_cfRequest;
};
+ struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
+ };
+
} // namespace WebCore
#endif // ResourceRequest_h
diff --git a/WebCore/platform/network/cf/ResourceResponse.h b/WebCore/platform/network/cf/ResourceResponse.h
index 04cc82c..5e27670 100644
--- a/WebCore/platform/network/cf/ResourceResponse.h
+++ b/WebCore/platform/network/cf/ResourceResponse.h
@@ -70,12 +70,18 @@ private:
friend class ResourceResponseBase;
void platformLazyInit();
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
+
static bool platformCompare(const ResourceResponse& a, const ResourceResponse& b);
RetainPtr<CFURLResponseRef> m_cfResponse;
bool m_isUpToDate;
};
+struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
+};
+
} // namespace WebCore
#endif // ResourceResponse_h
diff --git a/WebCore/platform/network/chromium/ResourceRequest.cpp b/WebCore/platform/network/chromium/ResourceRequest.cpp
index 016bd34..a33895a 100644
--- a/WebCore/platform/network/chromium/ResourceRequest.cpp
+++ b/WebCore/platform/network/chromium/ResourceRequest.cpp
@@ -37,4 +37,19 @@ unsigned initializeMaximumHTTPConnectionCountPerHost()
return 10000;
}
+PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const
+{
+ data->m_requestorID = m_requestorID;
+ data->m_requestorProcessID = m_requestorProcessID;
+ data->m_appCacheHostID = m_appCacheHostID;
+ return data;
+}
+
+void ResourceRequest::doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData> data)
+{
+ m_requestorID = data->m_requestorID;
+ m_requestorProcessID = data->m_requestorProcessID;
+ m_appCacheHostID = data->m_appCacheHostID;
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/network/chromium/ResourceRequest.h b/WebCore/platform/network/chromium/ResourceRequest.h
index 8ef0c5e..8571cf4 100644
--- a/WebCore/platform/network/chromium/ResourceRequest.h
+++ b/WebCore/platform/network/chromium/ResourceRequest.h
@@ -90,6 +90,15 @@ namespace WebCore {
void doUpdatePlatformRequest() {}
void doUpdateResourceRequest() {}
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData>) const;
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>);
+
+ int m_requestorID;
+ int m_requestorProcessID;
+ int m_appCacheHostID;
+ };
+
+ struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
int m_requestorID;
int m_requestorProcessID;
int m_appCacheHostID;
diff --git a/WebCore/platform/network/chromium/ResourceResponse.cpp b/WebCore/platform/network/chromium/ResourceResponse.cpp
new file mode 100644
index 0000000..acd44d3
--- /dev/null
+++ b/WebCore/platform/network/chromium/ResourceResponse.cpp
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ResourceResponse.h"
+
+namespace WebCore {
+
+PassOwnPtr<CrossThreadResourceResponseData> ResourceResponse::doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const
+{
+ data->m_appCacheID = m_appCacheID;
+ data->m_appCacheManifestURL = m_appCacheManifestURL.copy();
+ data->m_isContentFiltered = m_isContentFiltered;
+ data->m_isMultipartPayload = m_isMultipartPayload;
+ data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY;
+ data->m_wasNpnNegotiated = m_wasNpnNegotiated;
+ data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable;
+ data->m_wasFetchedViaProxy = m_wasFetchedViaProxy;
+ data->m_responseTime = m_responseTime;
+ return data;
+}
+
+void ResourceResponse::doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData> data)
+{
+ m_appCacheID = data->m_appCacheID;
+ m_appCacheManifestURL = data->m_appCacheManifestURL.copy();
+ m_isContentFiltered = data->m_isContentFiltered;
+ m_isMultipartPayload = data->m_isMultipartPayload;
+ m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY;
+ m_wasNpnNegotiated = data->m_wasNpnNegotiated;
+ m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable;
+ m_wasFetchedViaProxy = data->m_wasFetchedViaProxy;
+ m_responseTime = data->m_responseTime;
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/network/chromium/ResourceResponse.h b/WebCore/platform/network/chromium/ResourceResponse.h
index 852b9f5..5e99994 100644
--- a/WebCore/platform/network/chromium/ResourceResponse.h
+++ b/WebCore/platform/network/chromium/ResourceResponse.h
@@ -109,6 +109,9 @@ namespace WebCore {
notImplemented();
}
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData>) const;
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>);
+
// The id of the appcache this response was retrieved from, or zero if
// the response was not retrieved from an appcache.
long long m_appCacheID;
@@ -142,6 +145,18 @@ namespace WebCore {
double m_responseTime;
};
+ struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
+ long long m_appCacheID;
+ KURL m_appCacheManifestURL;
+ bool m_isContentFiltered;
+ bool m_isMultipartPayload;
+ bool m_wasFetchedViaSPDY;
+ bool m_wasNpnNegotiated;
+ bool m_wasAlternateProtocolAvailable;
+ bool m_wasFetchedViaProxy;
+ double m_responseTime;
+ };
+
} // namespace WebCore
#endif
diff --git a/WebCore/platform/network/curl/ResourceRequest.h b/WebCore/platform/network/curl/ResourceRequest.h
index 12dc214..c88501a 100644
--- a/WebCore/platform/network/curl/ResourceRequest.h
+++ b/WebCore/platform/network/curl/ResourceRequest.h
@@ -69,6 +69,12 @@ namespace WebCore {
void doUpdatePlatformRequest() {}
void doUpdateResourceRequest() {}
+
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>) { }
+ };
+
+ struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
};
} // namespace WebCore
diff --git a/WebCore/platform/network/curl/ResourceResponse.h b/WebCore/platform/network/curl/ResourceResponse.h
index 860e902..586fd11 100644
--- a/WebCore/platform/network/curl/ResourceResponse.h
+++ b/WebCore/platform/network/curl/ResourceResponse.h
@@ -52,9 +52,17 @@ public:
CFURLResponseRef cfURLResponse() const { return 0; }
private:
+ friend class ResourceResponseBase;
+
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
+
bool m_responseFired;
};
+struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
+};
+
} // namespace WebCore
#endif // ResourceResponse_h
diff --git a/WebCore/platform/network/mac/ResourceRequest.h b/WebCore/platform/network/mac/ResourceRequest.h
index b09e72d..ea0d13a 100644
--- a/WebCore/platform/network/mac/ResourceRequest.h
+++ b/WebCore/platform/network/mac/ResourceRequest.h
@@ -73,10 +73,16 @@ namespace WebCore {
void doUpdatePlatformRequest();
void doUpdateResourceRequest();
-
+
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>) { }
+
RetainPtr<NSURLRequest> m_nsRequest;
};
+ struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
+ };
+
} // namespace WebCore
#endif // ResourceRequest_h
diff --git a/WebCore/platform/network/mac/ResourceResponse.h b/WebCore/platform/network/mac/ResourceResponse.h
index 16b0cbf..2867e9f 100644
--- a/WebCore/platform/network/mac/ResourceResponse.h
+++ b/WebCore/platform/network/mac/ResourceResponse.h
@@ -75,12 +75,19 @@ private:
friend class ResourceResponseBase;
void platformLazyInit();
+
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
+
static bool platformCompare(const ResourceResponse& a, const ResourceResponse& b);
RetainPtr<NSURLResponse> m_nsResponse;
bool m_isUpToDate;
};
+struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
+};
+
} // namespace WebCore
#endif // ResourceResponse_h
diff --git a/WebCore/platform/network/qt/ResourceRequest.h b/WebCore/platform/network/qt/ResourceRequest.h
index fb69326..0c7b62b 100644
--- a/WebCore/platform/network/qt/ResourceRequest.h
+++ b/WebCore/platform/network/qt/ResourceRequest.h
@@ -66,6 +66,12 @@ namespace WebCore {
void doUpdatePlatformRequest() {}
void doUpdateResourceRequest() {}
+
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>) { }
+ };
+
+ struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
};
} // namespace WebCore
diff --git a/WebCore/platform/network/qt/ResourceResponse.h b/WebCore/platform/network/qt/ResourceResponse.h
index 345ef25..288cf84 100644
--- a/WebCore/platform/network/qt/ResourceResponse.h
+++ b/WebCore/platform/network/qt/ResourceResponse.h
@@ -40,6 +40,15 @@ public:
: ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
{
}
+
+private:
+ friend class ResourceResponseBase;
+
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
+};
+
+struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
};
} // namespace WebCore
diff --git a/WebCore/platform/network/soup/ResourceRequest.h b/WebCore/platform/network/soup/ResourceRequest.h
index a1d916f..c2c4419 100644
--- a/WebCore/platform/network/soup/ResourceRequest.h
+++ b/WebCore/platform/network/soup/ResourceRequest.h
@@ -80,6 +80,12 @@ namespace WebCore {
void doUpdatePlatformRequest() {};
void doUpdateResourceRequest() {};
+
+ PassOwnPtr<CrossThreadResourceRequestData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceRequestData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>) { }
+ };
+
+ struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
};
} // namespace WebCore
diff --git a/WebCore/platform/network/soup/ResourceResponse.h b/WebCore/platform/network/soup/ResourceResponse.h
index e6d872c..e7213f5 100644
--- a/WebCore/platform/network/soup/ResourceResponse.h
+++ b/WebCore/platform/network/soup/ResourceResponse.h
@@ -63,9 +63,13 @@ private:
SoupMessageFlags m_soupFlags;
- void doUpdateResourceResponse()
- {
- }
+ void doUpdateResourceResponse() { }
+
+ PassOwnPtr<CrossThreadResourceResponseData> doPlatformCopyData(PassOwnPtr<CrossThreadResourceResponseData> data) const { return data; }
+ void doPlatformAdopt(PassOwnPtr<CrossThreadResourceResponseData>) { }
+};
+
+struct CrossThreadResourceResponseData : public CrossThreadResourceResponseDataBase {
};
} // namespace WebCore
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list