Add a default ".isolatedCopy()" specialization to CrossThreadCopier This greatly simplifies the CrossThreadCopier code with what has become a de-facto best practice, and removes lots of code in the process
Created attachment 277708 [details] Patch v1
Comment on attachment 277708 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=277708&action=review > Source/WebCore/platform/CrossThreadCopier.cpp:139 > +COMPILE_ASSERT((std::is_same<int, CrossThreadCopier<PassRefPtr<CopierRefCountedTest>>::Type>::value), PassRefPtrRefCountedTest); > +COMPILE_ASSERT((std::is_same<int, CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type>::value), RefPtrRefCountedTest); > +COMPILE_ASSERT((std::is_same<int, CrossThreadCopier<CopierRefCountedTest*>::Type>::value), RawPointerRefCountedTest); Please change these to static_asserts while you're at it. > Source/WebCore/platform/CrossThreadCopier.h:105 > + WEBCORE_EXPORT static T copy(const T& value) Does this really need to be WEBCORE_EXPORT?
(In reply to comment #2) > Comment on attachment 277708 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=277708&action=review > > > Source/WebCore/platform/CrossThreadCopier.h:105 > > + WEBCORE_EXPORT static T copy(const T& value) > > Does this really need to be WEBCORE_EXPORT? I'll double check.
(In reply to comment #3) > (In reply to comment #2) > > Comment on attachment 277708 [details] > > Patch v1 > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=277708&action=review > > > > > Source/WebCore/platform/CrossThreadCopier.h:105 > > > + WEBCORE_EXPORT static T copy(const T& value) > > > > Does this really need to be WEBCORE_EXPORT? > > I'll double check. (Since it's templates in a header, probably not)
http://trac.webkit.org/changeset/200249