Bug 158185 - Templatize NoncopyableFunction class similarly to std::function
Summary: Templatize NoncopyableFunction class similarly to std::function
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: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 158173
  Show dependency treegraph
 
Reported: 2016-05-28 16:56 PDT by Chris Dumez
Modified: 2016-05-28 21:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (45.54 KB, patch)
2016-05-28 17:00 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (43.86 KB, patch)
2016-05-28 17:09 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (43.86 KB, patch)
2016-05-28 17:27 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-05-28 16:56:56 PDT
Templatize NoncopyableFunction class similarly to std::function, so that it can be used as a std::function replacement in more places.
Currently, NoncopyableFunction only supports "void()" lambdas.
Comment 1 Chris Dumez 2016-05-28 17:00:42 PDT
Created attachment 280050 [details]
Patch
Comment 2 WebKit Commit Bot 2016-05-28 17:02:30 PDT
Attachment 280050 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm:243:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:65:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:123:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:147:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/WorkQueue.h:75:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/WorkQueue.h:76:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:67:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:72:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:132:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:152:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:183:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:127:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:138:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:141:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:72:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:51:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:55:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:83:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:627:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/WorkQueueEfl.cpp:57:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/WorkQueueEfl.cpp:65:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h:81:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h:95:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:98:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:35:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:40:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:240:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:146:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/WorkQueueGeneric.cpp:84:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/WorkQueueGeneric.cpp:92:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/FunctionDispatcher.h:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:94:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:109:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:126:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:31:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:48:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:61:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:107:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:62:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:82:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:158:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.h:44:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:35:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:41:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.h:62:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:77:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:81:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.h:89:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/MediaStreamPrivate.h:115:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:302:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageSyncManager.h:46:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageSyncManager.cpp:66:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:37:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:47:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:61:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 69 in 37 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Chris Dumez 2016-05-28 17:09:53 PDT
Created attachment 280051 [details]
Patch
Comment 4 WebKit Commit Bot 2016-05-28 17:11:06 PDT
Attachment 280051 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm:243:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:65:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:123:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:147:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/WorkQueue.h:75:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/WorkQueue.h:76:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:67:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:72:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:132:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:152:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:183:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:127:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:138:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:141:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:72:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:51:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:55:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:83:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:627:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/WorkQueueEfl.cpp:57:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/WorkQueueEfl.cpp:65:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h:81:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h:95:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:98:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:35:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:40:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:240:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:146:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/WorkQueueGeneric.cpp:84:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/WorkQueueGeneric.cpp:92:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/FunctionDispatcher.h:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:94:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:109:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:126:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:31:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:48:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:61:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:107:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:62:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:82:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:158:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.h:44:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:35:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:41:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.h:62:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:77:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:81:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.h:89:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/MediaStreamPrivate.h:115:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:302:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageSyncManager.h:46:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageSyncManager.cpp:66:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:37:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:47:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:61:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 69 in 37 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Chris Dumez 2016-05-28 17:27:16 PDT
Created attachment 280052 [details]
Patch
Comment 6 WebKit Commit Bot 2016-05-28 17:29:54 PDT
Attachment 280052 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm:243:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.h:65:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:123:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.cpp:147:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/WorkQueue.h:75:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/WorkQueue.h:76:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:67:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:72:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/fileapi/AsyncFileStream.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:132:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:152:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkQueueWin.cpp:183:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:127:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:138:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/glib/RunLoopGLib.cpp:141:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:72:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:51:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:55:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.h:83:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:627:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/WorkQueueEfl.cpp:57:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/WorkQueueEfl.cpp:65:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h:81:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h:95:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:98:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:35:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:40:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/RunLoopGeneric.cpp:240:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:146:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/WorkQueueGeneric.cpp:84:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/generic/WorkQueueGeneric.cpp:92:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/FunctionDispatcher.h:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:94:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:109:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.cpp:126:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:31:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:42:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:48:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:61:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/page/scrolling/ScrollingThread.cpp:107:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:62:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:82:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/RunLoop.h:158:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/MainThread.h:44:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:35:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:41:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:50:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/win/WorkItemWin.cpp:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.h:49:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.h:62:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:77:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:81:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageThread.cpp:93:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.h:89:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/MediaStreamPrivate.h:115:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:302:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageSyncManager.h:46:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit/Storage/StorageSyncManager.cpp:66:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:37:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:47:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:52:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h:61:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 69 in 37 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Darin Adler 2016-05-28 20:57:48 PDT
Comment on attachment 280052 [details]
Patch

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

> Source/WTF/wtf/NoncopyableFunction.h:36
> +template <typename Out, typename... In>
> +class NoncopyableFunction<Out(In...)> {

The one thing I don’t understand about this template is that I would have expected it to contain a std::function as a data member and forward things in and out.

> Source/WTF/wtf/NoncopyableFunction.h:78
> -    class CallableWrapper final : public CallableWrapperBase {
> +    class CallableWrapper : public CallableWrapperBase {

Why no longer final?
Comment 8 WebKit Commit Bot 2016-05-28 21:18:53 PDT
Comment on attachment 280052 [details]
Patch

Clearing flags on attachment: 280052

Committed r201493: <http://trac.webkit.org/changeset/201493>
Comment 9 WebKit Commit Bot 2016-05-28 21:18:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Brady Eidson 2016-05-28 21:33:04 PDT
God dammit.

I'm doing this right now.

*Sigh*
Comment 11 Chris Dumez 2016-05-28 21:37:51 PDT
(In reply to comment #7)
> Comment on attachment 280052 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280052&action=review
> 
> > Source/WTF/wtf/NoncopyableFunction.h:36
> > +template <typename Out, typename... In>
> > +class NoncopyableFunction<Out(In...)> {
> 
> The one thing I don’t understand about this template is that I would have
> expected it to contain a std::function as a data member and forward things
> in and out.
> 
> > Source/WTF/wtf/NoncopyableFunction.h:78
> > -    class CallableWrapper final : public CallableWrapperBase {
> > +    class CallableWrapper : public CallableWrapperBase {
> 
> Why no longer final?

Oops, I did not mean to drop it.
Comment 12 Brady Eidson 2016-05-28 21:38:29 PDT
Comment on attachment 280052 [details]
Patch

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

That'll teach me to work on something before checking my email ever 4 hours ever again.

That said, I spotted something that I believe is suboptimal.

> Source/WTF/wtf/NoncopyableFunction.h:46
> +    Out operator()(In... in) const

I believe this could be:
Out operator()(In&&... in) const

> Source/WTF/wtf/NoncopyableFunction.h:74
> +        virtual Out call(In...) = 0;

I believe this could be:
virtual Out call(In&&... in) = 0;

> Source/WTF/wtf/NoncopyableFunction.h:88
> +        Out call(In... in) final { return m_callable(std::forward<In>(in)...); }

I believe this could be:
Out call(In&&... in) final { return m_callable(std::forward<In>(in)...); }
Comment 13 Chris Dumez 2016-05-28 21:39:38 PDT
(In reply to comment #10)
> God dammit.
> 
> I'm doing this right now.
> 
> *Sigh*

Sorry, I did not know. I thought you were working on cleaning up the dispatch() call sites.
Comment 14 Brady Eidson 2016-05-28 21:43:01 PDT
(In reply to comment #7)
> Comment on attachment 280052 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280052&action=review
> 
> > Source/WTF/wtf/NoncopyableFunction.h:36
> > +template <typename Out, typename... In>
> > +class NoncopyableFunction<Out(In...)> {
> 
> The one thing I don’t understand about this template is that I would have
> expected it to contain a std::function as a data member and forward things
> in and out.

Just to close the loop on this review feedback, and leave it here for the record in case anybody else is looking around in the future:

We actually *can't* do this, and the reason why is why we had to make NoncopyableFunction in the first place.

std::function<> has a crappy spec requirement which is that any std::function<> has to be Copy Constructible.

Even if you plan to be very careful, and only ever move() your std::function<>s around, never making copies of them... std::function itself is still copy constructible.

Which means, if you're wrapping a lambda that is *not* copy constructible, std::function<> cannot wrap it.

So lambdas that contain Ref<> or std::unique_ptrs<> cannot be wrapped by std::function<>

And it turns out we have a *lot* of such lambdas that we *want* to wrap in a std::function<>-type wrapper.
Comment 15 Chris Dumez 2016-05-28 21:43:44 PDT
Comment on attachment 280052 [details]
Patch

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

>> Source/WTF/wtf/NoncopyableFunction.h:46
>> +    Out operator()(In... in) const
> 
> I believe this could be:
> Out operator()(In&&... in) const

my version matches std::function I believe. Since In is a template , it can match references or rvalue references.
Comment 16 Brady Eidson 2016-05-28 21:44:09 PDT
(In reply to comment #13)
> (In reply to comment #10)
> > God dammit.
> > 
> > I'm doing this right now.
> > 
> > *Sigh*
> 
> Sorry, I did not know. I thought you were working on cleaning up the
> dispatch() call sites.

You had no way of knowing.

I was working on that. And it turns out, to make meaningful progress on that task, I needed this. :)

No bigs, I had barely templates out the WTF class and hadn't done any of this other work.
Comment 17 Brady Eidson 2016-05-28 21:45:29 PDT
(In reply to comment #15)
> Comment on attachment 280052 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280052&action=review
> 
> >> Source/WTF/wtf/NoncopyableFunction.h:46
> >> +    Out operator()(In... in) const
> > 
> > I believe this could be:
> > Out operator()(In&&... in) const
> 
> my version matches std::function I believe. Since In is a template , it can
> match references or rvalue references.

I guess what I was getting at was that if our NoncopyableFunction *only* had the && form, then we could enforce only using it with moveable parameters, perhaps saving unnecessary copying along the way.

It's probably not worth fixing the trouble that would arise.
Comment 18 Chris Dumez 2016-05-28 21:51:37 PDT
(In reply to comment #17)
> (In reply to comment #15)
> > Comment on attachment 280052 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=280052&action=review
> > 
> > >> Source/WTF/wtf/NoncopyableFunction.h:46
> > >> +    Out operator()(In... in) const
> > > 
> > > I believe this could be:
> > > Out operator()(In&&... in) const
> > 
> > my version matches std::function I believe. Since In is a template , it can
> > match references or rvalue references.
> 
> I guess what I was getting at was that if our NoncopyableFunction *only* had
> the && form, then we could enforce only using it with moveable parameters,
> perhaps saving unnecessary copying along the way.
> 
> It's probably not worth fixing the trouble that would arise.

Ah ok. I was trying to stay as close as possible to std::function, merely making it non copyable. For the record, using In&& by itself would not force the caller to pass an rvalue reference. it would require further restriction on In, similarly to what I did for the CallableType template parameter.