Bug 158207 - Move CrossThreadCopier/CrossThreadTask to WTF
Summary: Move CrossThreadCopier/CrossThreadTask to WTF
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 158208 158215
  Show dependency treegraph
 
Reported: 2016-05-30 09:11 PDT by Brady Eidson
Modified: 2016-05-30 21:41 PDT (History)
2 users (show)

See Also:


Attachments
Patch (91.32 KB, patch)
2016-05-30 14:19 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (91.41 KB, patch)
2016-05-30 14:47 PDT, Brady Eidson
no flags 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-30 09:11:14 PDT
Move CrossThreadCopier/CrossThreadTask to WTF
Comment 1 Brady Eidson 2016-05-30 14:19:04 PDT
Created attachment 280112 [details]
Patch
Comment 2 WebKit Commit Bot 2016-05-30 14:21:54 PDT
Attachment 280112 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/CrossThreadCopier.cpp:44:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/CrossThreadCopier.cpp:49:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/CrossThreadCopier.cpp:54:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/CrossThreadTask.h:36:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/CrossThreadTask.h:50:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 5 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brady Eidson 2016-05-30 14:47:41 PDT
Created attachment 280113 [details]
Patch
Comment 4 WebKit Commit Bot 2016-05-30 14:49:05 PDT
Attachment 280113 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/CrossThreadCopier.cpp:44:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/CrossThreadCopier.cpp:49:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/CrossThreadCopier.cpp:54:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/CrossThreadTask.h:36:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/CrossThreadTask.h:50:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 5 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Alex Christensen 2016-05-30 16:22:37 PDT
Comment on attachment 280113 [details]
Patch

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

> Source/WebCore/platform/WebCoreCrossThreadCopier.cpp:2
> + * Copyright (C) 2009 Google Inc. All rights reserved.

Google? Isn't this a new file?

> Source/WebCore/platform/WebCoreCrossThreadCopier.h:44
> +    typedef WebCore::SessionID Type;

Darin has been using using for typedefs recently
Comment 6 Brady Eidson 2016-05-30 20:12:13 PDT
(In reply to comment #5)
> Comment on attachment 280113 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280113&action=review
> 
> > Source/WebCore/platform/WebCoreCrossThreadCopier.cpp:2
> > + * Copyright (C) 2009 Google Inc. All rights reserved.
> 
> Google? Isn't this a new file?

Ahhhhhhhh git. Not always getting file version history.

(No, it's not)

> > Source/WebCore/platform/WebCoreCrossThreadCopier.h:44
> > +    typedef WebCore::SessionID Type;
> 
> Darin has been using using for typedefs recently

I'll decline to change that at this point as the typedef is established in the copiers.

Interesting that we're starting to do that. I'm not sure I see the advantage.
Comment 7 WebKit Commit Bot 2016-05-30 20:34:30 PDT
Comment on attachment 280113 [details]
Patch

Clearing flags on attachment: 280113

Committed r201504: <http://trac.webkit.org/changeset/201504>
Comment 8 WebKit Commit Bot 2016-05-30 20:34:34 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Chris Dumez 2016-05-30 21:01:41 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > Comment on attachment 280113 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=280113&action=review
> > 
> > > Source/WebCore/platform/WebCoreCrossThreadCopier.cpp:2
> > > + * Copyright (C) 2009 Google Inc. All rights reserved.
> > 
> > Google? Isn't this a new file?
> 
> Ahhhhhhhh git. Not always getting file version history.
> 
> (No, it's not)
> 
> > > Source/WebCore/platform/WebCoreCrossThreadCopier.h:44
> > > +    typedef WebCore::SessionID Type;
> > 
> > Darin has been using using for typedefs recently
> 
> I'll decline to change that at this point as the typedef is established in
> the copiers.
> 
> Interesting that we're starting to do that. I'm not sure I see the advantage.

Not a big deal, but I prefer "using" as well because I find it more readable than a typedef (I am always confused about which comes first in a typedef statement, the alias or the type). Also, using can be templated, unlike typedef.
Comment 10 Brady Eidson 2016-05-30 21:41:10 PDT
(In reply to comment #9)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Comment on attachment 280113 [details]
> > > Patch
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=280113&action=review
> > > 
> > > > Source/WebCore/platform/WebCoreCrossThreadCopier.cpp:2
> > > > + * Copyright (C) 2009 Google Inc. All rights reserved.
> > > 
> > > Google? Isn't this a new file?
> > 
> > Ahhhhhhhh git. Not always getting file version history.
> > 
> > (No, it's not)
> > 
> > > > Source/WebCore/platform/WebCoreCrossThreadCopier.h:44
> > > > +    typedef WebCore::SessionID Type;
> > > 
> > > Darin has been using using for typedefs recently
> > 
> > I'll decline to change that at this point as the typedef is established in
> > the copiers.
> > 
> > Interesting that we're starting to do that. I'm not sure I see the advantage.
> 
> Not a big deal, but I prefer "using" as well because I find it more readable
> than a typedef (I am always confused about which comes first in a typedef
> statement, the alias or the type).

This is certainly subjective. I'm the opposite. typedef has exactly one use, and has for the entire existence of C++, and the order has never changed. I also think the context almost always makes it clear which is the newly declared type.

Whereas with using I always have to get over a mental hurdle of "why am I seeing this here, and why with an '='? Statements that use 'using' have never had '='..."

> Also, using can be templated, unlike typedef.

This is definitely an objective advantage.

One I've never seen in practice, though. :)