<!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>[200156] 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/200156">200156</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-04-27 15:53:52 -0700 (Wed, 27 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modernize platform/CrossThreadCopier.h style.
https://bugs.webkit.org/show_bug.cgi?id=157106
Reviewed by Alex Christensen.
No new tests (No change in behavior).
* platform/CrossThreadCopier.h:
(WebCore::CrossThreadCopierPassThrough::copy):
(WebCore::AllowCrossThreadAccessWrapper::AllowCrossThreadAccessWrapper):
(WebCore::AllowCrossThreadAccessWrapper::value):
(WebCore::AllowCrossThreadAccess):
(WebCore::AllowAccessLaterWrapper::AllowAccessLaterWrapper):
(WebCore::AllowAccessLaterWrapper::value):
(WebCore::AllowAccessLater):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopierh">trunk/Source/WebCore/platform/CrossThreadCopier.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200155 => 200156)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-27 22:50:02 UTC (rev 200155)
+++ trunk/Source/WebCore/ChangeLog        2016-04-27 22:53:52 UTC (rev 200156)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-04-27 Brady Eidson <beidson@apple.com>
+
+ Modernize platform/CrossThreadCopier.h style.
+ https://bugs.webkit.org/show_bug.cgi?id=157106
+
+ Reviewed by Alex Christensen.
+
+ No new tests (No change in behavior).
+
+ * platform/CrossThreadCopier.h:
+ (WebCore::CrossThreadCopierPassThrough::copy):
+ (WebCore::AllowCrossThreadAccessWrapper::AllowCrossThreadAccessWrapper):
+ (WebCore::AllowCrossThreadAccessWrapper::value):
+ (WebCore::AllowCrossThreadAccess):
+ (WebCore::AllowAccessLaterWrapper::AllowAccessLaterWrapper):
+ (WebCore::AllowAccessLaterWrapper::value):
+ (WebCore::AllowAccessLater):
+
</ins><span class="cx"> 2016-04-27 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Speculative fix for null pointer dereference.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.h (200155 => 200156)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.h        2016-04-27 22:50:02 UTC (rev 200155)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.h        2016-04-27 22:53:52 UTC (rev 200156)
</span><span class="lines">@@ -28,8 +28,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 CrossThreadCopier_h
-#define CrossThreadCopier_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include <wtf/Assertions.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="lines">@@ -39,245 +38,245 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>- class IntRect;
- class IntSize;
- class URL;
- class ResourceError;
- class ResourceRequest;
- class ResourceResponse;
- class SessionID;
- class ThreadSafeDataBuffer;
- struct CrossThreadResourceResponseData;
- struct CrossThreadResourceRequestData;
- struct ThreadableLoaderOptions;
</del><ins>+class IntRect;
+class IntSize;
+class URL;
+class ResourceError;
+class ResourceRequest;
+class ResourceResponse;
+class SessionID;
+class ThreadSafeDataBuffer;
+struct CrossThreadResourceResponseData;
+struct CrossThreadResourceRequestData;
+struct ThreadableLoaderOptions;
</ins><span class="cx">
</span><del>- struct CrossThreadCopierBaseHelper {
- template<typename T> struct RemovePointer {
- typedef T Type;
- };
- template<typename T> struct RemovePointer<T*> {
- typedef T Type;
- };
-
- template<typename T> struct RemovePointer<RefPtr<T>> {
- typedef T Type;
- };
-
- template<typename T> struct RemovePointer<PassRefPtr<T>> {
- typedef T Type;
- };
-
- template<typename T> struct IsEnumOrConvertibleToInteger {
- static const bool value = std::is_integral<T>::value || std::is_enum<T>::value || std::is_convertible<T, long double>::value;
- };
-
- template<typename T> struct IsThreadSafeRefCountedPointer {
- static const bool value = std::is_convertible<typename RemovePointer<T>::Type*, ThreadSafeRefCounted<typename RemovePointer<T>::Type>*>::value;
- };
</del><ins>+struct CrossThreadCopierBaseHelper {
+ template<typename T> struct RemovePointer {
+ typedef T Type;
</ins><span class="cx"> };
</span><ins>+ template<typename T> struct RemovePointer<T*> {
+ typedef T Type;
+ };
</ins><span class="cx">
</span><del>- template<typename T> struct CrossThreadCopierPassThrough {
</del><ins>+ template<typename T> struct RemovePointer<RefPtr<T>> {
</ins><span class="cx"> typedef T Type;
</span><del>- static Type copy(const T& parameter)
- {
- return parameter;
- }
</del><span class="cx"> };
</span><span class="cx">
</span><del>- template<bool isEnumOrConvertibleToInteger, bool isThreadSafeRefCounted, typename T> struct CrossThreadCopierBase;
-
- // Integers get passed through without any changes.
- template<typename T> struct CrossThreadCopierBase<true, false, T> : public CrossThreadCopierPassThrough<T> {
</del><ins>+ template<typename T> struct RemovePointer<PassRefPtr<T>> {
+ typedef T Type;
</ins><span class="cx"> };
</span><span class="cx">
</span><del>- // To allow a type to be passed across threads using its copy constructor, add a forward declaration of the type and
- // a CopyThreadCopierBase<false, false, TypeName> : public CrossThreadCopierPassThrough<TypeName> { }; to this file.
- template<> struct CrossThreadCopierBase<false, false, IntRect> : public CrossThreadCopierPassThrough<IntRect> {
</del><ins>+ template<typename T> struct IsEnumOrConvertibleToInteger {
+ static const bool value = std::is_integral<T>::value || std::is_enum<T>::value || std::is_convertible<T, long double>::value;
</ins><span class="cx"> };
</span><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, IntSize> : public CrossThreadCopierPassThrough<IntSize> {
</del><ins>+ template<typename T> struct IsThreadSafeRefCountedPointer {
+ static const bool value = std::is_convertible<typename RemovePointer<T>::Type*, ThreadSafeRefCounted<typename RemovePointer<T>::Type>*>::value;
</ins><span class="cx"> };
</span><ins>+};
</ins><span class="cx">
</span><del>- // Custom copy methods.
- template<typename T> struct CrossThreadCopierBase<false, true, T> {
- typedef typename CrossThreadCopierBaseHelper::RemovePointer<T>::Type RefCountedType;
- static_assert(std::is_convertible<RefCountedType*, ThreadSafeRefCounted<RefCountedType>*>::value, "T is not convertible to ThreadSafeRefCounted!");
</del><ins>+template<typename T> struct CrossThreadCopierPassThrough {
+ typedef T Type;
+ static Type copy(const T& parameter)
+ {
+ return parameter;
+ }
+};
</ins><span class="cx">
</span><del>- typedef PassRefPtr<RefCountedType> Type;
- WEBCORE_EXPORT static Type copy(const T& refPtr)
- {
- return refPtr;
- }
- };
</del><ins>+template<bool isEnumOrConvertibleToInteger, bool isThreadSafeRefCounted, typename T> struct CrossThreadCopierBase;
</ins><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, URL> {
- typedef URL Type;
- static Type copy(const URL&);
- };
</del><ins>+// Integers get passed through without any changes.
+template<typename T> struct CrossThreadCopierBase<true, false, T> : public CrossThreadCopierPassThrough<T> {
+};
</ins><span class="cx">
</span><del>- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, String> {
- typedef String Type;
- static Type copy(const String&);
- };
</del><ins>+// To allow a type to be passed across threads using its copy constructor, add a forward declaration of the type and
+// a CopyThreadCopierBase<false, false, TypeName> : public CrossThreadCopierPassThrough<TypeName> { }; to this file.
+template<> struct CrossThreadCopierBase<false, false, IntRect> : public CrossThreadCopierPassThrough<IntRect> {
+};
</ins><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, ResourceError> {
- typedef ResourceError Type;
- static Type copy(const ResourceError&);
- };
</del><ins>+template<> struct CrossThreadCopierBase<false, false, IntSize> : public CrossThreadCopierPassThrough<IntSize> {
+};
</ins><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, ResourceRequest> {
- typedef std::unique_ptr<CrossThreadResourceRequestData> Type;
- static Type copy(const ResourceRequest&);
- };
</del><ins>+// Custom copy methods.
+template<typename T> struct CrossThreadCopierBase<false, true, T> {
+ typedef typename CrossThreadCopierBaseHelper::RemovePointer<T>::Type RefCountedType;
+ static_assert(std::is_convertible<RefCountedType*, ThreadSafeRefCounted<RefCountedType>*>::value, "T is not convertible to ThreadSafeRefCounted!");
</ins><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, ResourceResponse> {
- typedef std::unique_ptr<CrossThreadResourceResponseData> Type;
- static Type copy(const ResourceResponse&);
- };
</del><ins>+ typedef PassRefPtr<RefCountedType> Type;
+ WEBCORE_EXPORT static Type copy(const T& refPtr)
+ {
+ return refPtr;
+ }
+};
</ins><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, SessionID> {
- typedef SessionID Type;
- static Type copy(const SessionID&);
- };
</del><ins>+template<> struct CrossThreadCopierBase<false, false, URL> {
+ typedef URL Type;
+ static Type copy(const URL&);
+};
</ins><span class="cx">
</span><del>- template<> struct CrossThreadCopierBase<false, false, ThreadSafeDataBuffer> {
- typedef ThreadSafeDataBuffer Type;
- static Type copy(const ThreadSafeDataBuffer&);
- };
</del><ins>+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, String> {
+ typedef String Type;
+ static Type copy(const String&);
+};
</ins><span class="cx">
</span><ins>+template<> struct CrossThreadCopierBase<false, false, ResourceError> {
+ typedef ResourceError Type;
+ static Type copy(const ResourceError&);
+};
+
+template<> struct CrossThreadCopierBase<false, false, ResourceRequest> {
+ typedef std::unique_ptr<CrossThreadResourceRequestData> Type;
+ static Type copy(const ResourceRequest&);
+};
+
+template<> struct CrossThreadCopierBase<false, false, ResourceResponse> {
+ typedef std::unique_ptr<CrossThreadResourceResponseData> Type;
+ static Type copy(const ResourceResponse&);
+};
+
+template<> struct CrossThreadCopierBase<false, false, SessionID> {
+ typedef SessionID Type;
+ static Type copy(const SessionID&);
+};
+
+template<> struct CrossThreadCopierBase<false, false, ThreadSafeDataBuffer> {
+ typedef ThreadSafeDataBuffer Type;
+ static Type copy(const ThreadSafeDataBuffer&);
+};
+
</ins><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><del>- namespace IndexedDB {
- enum class TransactionMode;
- enum class CursorDirection;
- enum class CursorType;
- }
- template<> struct CrossThreadCopierBase<false, false, IndexedDB::TransactionMode> {
- WEBCORE_EXPORT static IndexedDB::TransactionMode copy(const IndexedDB::TransactionMode&);
- };
- template<> struct CrossThreadCopierBase<false, false, IndexedDB::CursorDirection> {
- WEBCORE_EXPORT static IndexedDB::CursorDirection copy(const IndexedDB::CursorDirection&);
- };
- template<> struct CrossThreadCopierBase<false, false, IndexedDB::CursorType> {
- WEBCORE_EXPORT static IndexedDB::CursorType copy(const IndexedDB::CursorType&);
- };
</del><ins>+namespace IndexedDB {
+enum class TransactionMode;
+enum class CursorDirection;
+enum class CursorType;
+}
+template<> struct CrossThreadCopierBase<false, false, IndexedDB::TransactionMode> {
+ WEBCORE_EXPORT static IndexedDB::TransactionMode copy(const IndexedDB::TransactionMode&);
+};
+template<> struct CrossThreadCopierBase<false, false, IndexedDB::CursorDirection> {
+ WEBCORE_EXPORT static IndexedDB::CursorDirection copy(const IndexedDB::CursorDirection&);
+};
+template<> struct CrossThreadCopierBase<false, false, IndexedDB::CursorType> {
+ WEBCORE_EXPORT static IndexedDB::CursorType copy(const IndexedDB::CursorType&);
+};
</ins><span class="cx">
</span><del>- class IDBGetResult;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBGetResult> {
- typedef IDBGetResult Type;
- static Type copy(const IDBGetResult&);
- };
</del><ins>+class IDBGetResult;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBGetResult> {
+ typedef IDBGetResult Type;
+ static Type copy(const IDBGetResult&);
+};
</ins><span class="cx">
</span><del>- class IDBKeyData;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBKeyData> {
- typedef IDBKeyData Type;
- static Type copy(const IDBKeyData&);
- };
</del><ins>+class IDBKeyData;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBKeyData> {
+ typedef IDBKeyData Type;
+ static Type copy(const IDBKeyData&);
+};
</ins><span class="cx">
</span><del>- struct IDBKeyRangeData;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBKeyRangeData> {
- typedef IDBKeyRangeData Type;
- static Type copy(const IDBKeyRangeData&);
- };
</del><ins>+struct IDBKeyRangeData;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBKeyRangeData> {
+ typedef IDBKeyRangeData Type;
+ static Type copy(const IDBKeyRangeData&);
+};
</ins><span class="cx">
</span><del>- class IDBDatabaseInfo;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBDatabaseInfo> {
- typedef IDBDatabaseInfo Type;
- static Type copy(const IDBDatabaseInfo&);
- };
</del><ins>+class IDBDatabaseInfo;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBDatabaseInfo> {
+ typedef IDBDatabaseInfo Type;
+ static Type copy(const IDBDatabaseInfo&);
+};
</ins><span class="cx">
</span><del>- class IDBDatabaseIdentifier;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBDatabaseIdentifier> {
- typedef IDBDatabaseIdentifier Type;
- static Type copy(const IDBDatabaseIdentifier&);
- };
</del><ins>+class IDBDatabaseIdentifier;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBDatabaseIdentifier> {
+ typedef IDBDatabaseIdentifier Type;
+ static Type copy(const IDBDatabaseIdentifier&);
+};
</ins><span class="cx">
</span><del>- class IDBError;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBError> {
- typedef IDBError Type;
- static Type copy(const IDBError&);
- };
</del><ins>+class IDBError;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBError> {
+ typedef IDBError Type;
+ static Type copy(const IDBError&);
+};
</ins><span class="cx">
</span><del>- class IDBResourceIdentifier;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBResourceIdentifier> {
- typedef IDBResourceIdentifier Type;
- static Type copy(const IDBResourceIdentifier&);
- };
</del><ins>+class IDBResourceIdentifier;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBResourceIdentifier> {
+ typedef IDBResourceIdentifier Type;
+ static Type copy(const IDBResourceIdentifier&);
+};
</ins><span class="cx">
</span><del>- class IDBTransactionInfo;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBTransactionInfo> {
- typedef IDBTransactionInfo Type;
- static Type copy(const IDBTransactionInfo&);
- };
</del><ins>+class IDBTransactionInfo;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBTransactionInfo> {
+ typedef IDBTransactionInfo Type;
+ static Type copy(const IDBTransactionInfo&);
+};
</ins><span class="cx">
</span><del>- class IDBObjectStoreInfo;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBObjectStoreInfo> {
- typedef IDBObjectStoreInfo Type;
- static Type copy(const IDBObjectStoreInfo&);
- };
</del><ins>+class IDBObjectStoreInfo;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBObjectStoreInfo> {
+ typedef IDBObjectStoreInfo Type;
+ static Type copy(const IDBObjectStoreInfo&);
+};
</ins><span class="cx">
</span><del>- class IDBIndexInfo;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBIndexInfo> {
- typedef IDBIndexInfo Type;
- static Type copy(const IDBIndexInfo&);
- };
</del><ins>+class IDBIndexInfo;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBIndexInfo> {
+ typedef IDBIndexInfo Type;
+ static Type copy(const IDBIndexInfo&);
+};
</ins><span class="cx">
</span><del>- class IDBCursorInfo;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBCursorInfo> {
- typedef IDBCursorInfo Type;
- static Type copy(const IDBCursorInfo&);
- };
</del><ins>+class IDBCursorInfo;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBCursorInfo> {
+ typedef IDBCursorInfo Type;
+ static Type copy(const IDBCursorInfo&);
+};
</ins><span class="cx">
</span><del>- class IDBValue;
- template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBValue> {
- typedef IDBValue Type;
- static Type copy(const IDBValue&);
- };
</del><ins>+class IDBValue;
+template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBValue> {
+ typedef IDBValue Type;
+ static Type copy(const IDBValue&);
+};
</ins><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- template<typename T>
- struct CrossThreadCopier : public CrossThreadCopierBase<CrossThreadCopierBaseHelper::IsEnumOrConvertibleToInteger<T>::value, CrossThreadCopierBaseHelper::IsThreadSafeRefCountedPointer<T>::value, T> {
- };
</del><ins>+template<typename T>
+struct CrossThreadCopier : public CrossThreadCopierBase<CrossThreadCopierBaseHelper::IsEnumOrConvertibleToInteger<T>::value, CrossThreadCopierBaseHelper::IsThreadSafeRefCountedPointer<T>::value, T> {
+};
</ins><span class="cx">
</span><del>- template<typename T> struct AllowCrossThreadAccessWrapper {
- public:
- explicit AllowCrossThreadAccessWrapper(T* value) : m_value(value) { }
- T* value() const { return m_value; }
- private:
- T* m_value;
- };
</del><ins>+template<typename T> struct AllowCrossThreadAccessWrapper {
+public:
+ explicit AllowCrossThreadAccessWrapper(T* value)
+ : m_value(value) { }
+ T* value() const { return m_value; }
+private:
+ T* m_value;
+};
</ins><span class="cx">
</span><del>- template<typename T> struct CrossThreadCopierBase<false, false, AllowCrossThreadAccessWrapper<T>> {
- typedef T* Type;
- static Type copy(const AllowCrossThreadAccessWrapper<T>& wrapper) { return wrapper.value(); }
- };
</del><ins>+template<typename T> struct CrossThreadCopierBase<false, false, AllowCrossThreadAccessWrapper<T>> {
+ typedef T* Type;
+ static Type copy(const AllowCrossThreadAccessWrapper<T>& wrapper) { return wrapper.value(); }
+};
</ins><span class="cx">
</span><del>- template<typename T> AllowCrossThreadAccessWrapper<T> AllowCrossThreadAccess(T* value)
- {
- return AllowCrossThreadAccessWrapper<T>(value);
- }
</del><ins>+template<typename T> AllowCrossThreadAccessWrapper<T> AllowCrossThreadAccess(T* value)
+{
+ return AllowCrossThreadAccessWrapper<T>(value);
+}
</ins><span class="cx">
</span><del>- // FIXME: Move to a different header file. AllowAccessLater is for cross-thread access
- // that is not cross-thread (tasks posted to a queue guaranteed to run on the same thread).
- template<typename T> struct AllowAccessLaterWrapper {
- public:
- explicit AllowAccessLaterWrapper(T* value) : m_value(value) { }
- T* value() const { return m_value; }
- private:
- T* m_value;
- };
</del><ins>+// FIXME: Move to a different header file. AllowAccessLater is for cross-thread access
+// that is not cross-thread (tasks posted to a queue guaranteed to run on the same thread).
+template<typename T> struct AllowAccessLaterWrapper {
+public:
+ explicit AllowAccessLaterWrapper(T* value)
+ : m_value(value) { }
+ T* value() const { return m_value; }
+private:
+ T* m_value;
+};
</ins><span class="cx">
</span><del>- template<typename T> struct CrossThreadCopierBase<false, false, AllowAccessLaterWrapper<T>> {
- typedef T* Type;
- static Type copy(const AllowAccessLaterWrapper<T>& wrapper) { return wrapper.value(); }
- };
</del><ins>+template<typename T> struct CrossThreadCopierBase<false, false, AllowAccessLaterWrapper<T>> {
+ typedef T* Type;
+ static Type copy(const AllowAccessLaterWrapper<T>& wrapper) { return wrapper.value(); }
+};
</ins><span class="cx">
</span><del>- template<typename T> AllowAccessLaterWrapper<T> AllowAccessLater(T* value)
- {
- return AllowAccessLaterWrapper<T>(value);
- }
</del><ins>+template<typename T> AllowAccessLaterWrapper<T> AllowAccessLater(T* value)
+{
+ return AllowAccessLaterWrapper<T>(value);
+}
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // CrossThreadCopier_h
</del></span></pre>
</div>
</div>
</body>
</html>