Bug 157675 - Give CrossThreadCopier a default specialization for Vectors of objects
Summary: Give CrossThreadCopier a default specialization for Vectors of objects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-13 08:53 PDT by Brady Eidson
Modified: 2016-05-13 13:17 PDT (History)
1 user (show)

See Also:


Attachments
Patch v1 (2.91 KB, patch)
2016-05-13 09:00 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (2.91 KB, patch)
2016-05-13 09:07 PDT, Brady Eidson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-05-13 08:53:07 PDT
Give CrossThreadCopier a generic specialization for Vectors of objects
Comment 1 Brady Eidson 2016-05-13 09:00:59 PDT
Created attachment 278838 [details]
Patch v1
Comment 2 WebKit Commit Bot 2016-05-13 09:02:56 PDT
Attachment 278838 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/CrossThreadCopier.h:170:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brady Eidson 2016-05-13 09:07:47 PDT
Created attachment 278839 [details]
Patch
Comment 4 Darin Adler 2016-05-13 09:31:25 PDT
Comment on attachment 278839 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=278839&action=review

> Source/WebCore/platform/CrossThreadCopier.h:170
> +    static Type copy(const Vector<T>& source)

I would have written const Type&.

> Source/WebCore/platform/CrossThreadCopier.h:176
> +

I would have omitted this blank line.
Comment 5 Darin Adler 2016-05-13 09:31:45 PDT
Comment on attachment 278839 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=278839&action=review

> Source/WebCore/platform/CrossThreadCopier.h:168
> +template<typename T> struct CrossThreadCopierBase<false, false, Vector<T>> {

Could consider making this work for vectors with inline capacity too.
Comment 6 Brady Eidson 2016-05-13 10:23:07 PDT
(In reply to comment #5)
> Comment on attachment 278839 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=278839&action=review
> 
> > Source/WebCore/platform/CrossThreadCopier.h:168
> > +template<typename T> struct CrossThreadCopierBase<false, false, Vector<T>> {
> 
> Could consider making this work for vectors with inline capacity too.

I think this would require a second specialization, so I'll punt until it's actually needed (Which, since these are rare enough, might be never)
Comment 7 Brady Eidson 2016-05-13 10:36:48 PDT
http://trac.webkit.org/changeset/200861