Move CrossThreadCopier/CrossThreadTask to WTF
Created attachment 280112 [details] Patch
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.
Created attachment 280113 [details] Patch
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 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
(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 on attachment 280113 [details] Patch Clearing flags on attachment: 280113 Committed r201504: <http://trac.webkit.org/changeset/201504>
All reviewed patches have been landed. Closing bug.
(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.
(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. :)