RESOLVED FIXED 157185
Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and other small cleanup
https://bugs.webkit.org/show_bug.cgi?id=157185
Summary Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and othe...
Brady Eidson
Reported 2016-04-29 09:36:35 PDT
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
Attachments
Patch v1 (16.60 KB, patch)
2016-04-29 09:39 PDT, Brady Eidson
andersca: review+
Brady Eidson
Comment 1 2016-04-29 09:39:36 PDT
Created attachment 277708 [details] Patch v1
Anders Carlsson
Comment 2 2016-04-29 09:57:40 PDT
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?
Brady Eidson
Comment 3 2016-04-29 09:58:56 PDT
(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.
Brady Eidson
Comment 4 2016-04-29 09:59:28 PDT
(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)
Brady Eidson
Comment 5 2016-04-29 10:05:28 PDT
Note You need to log in before you can comment on or make changes to this bug.