Bug 158196

Summary: Transition various Task/Function queues from std::function to NoncopyableFunction
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 158173    
Attachments:
Description Flags
Patch
none
Patch none

Description Brady Eidson 2016-05-29 22:16:41 PDT
Transition various Task/Function queues from std::function to NoncopyableFunction

Another smaller step towards https://bugs.webkit.org/show_bug.cgi?id=158173
Comment 1 Brady Eidson 2016-05-29 22:22:45 PDT
Created attachment 280070 [details]
Patch
Comment 2 Chris Dumez 2016-05-29 22:33:09 PDT
Patch does not apply
Comment 3 Chris Dumez 2016-05-29 22:39:17 PDT
Comment on attachment 280070 [details]
Patch

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

R=me with a couple of comments

> Source/WebCore/html/HTMLMediaElement.cpp:3997
> +    NoncopyableFunction<void()> task = [this, protectedThis = Ref<Element>(*this)] {

Could use "auto task = ..."

> Source/WebCore/page/FrameView.cpp:3150
> +    queue.swap(m_postLayoutCallbackQueue);

I thought we preferred to use WTFMove() for these sort of things these days:
Vector<NoncopyableFunction<void()>> queue = WTFMove(m_postLayoutCallbackQueue);

> Source/WebCore/platform/GenericTaskQueue.h:87
>      void enqueueTask(TaskFunction task)

Should be a TaskFunction&& ?
Comment 4 Brady Eidson 2016-05-29 23:07:38 PDT
Created attachment 280073 [details]
Patch
Comment 5 WebKit Commit Bot 2016-05-29 23:08:24 PDT
Attachment 280073 [details] did not pass style-queue:


ERROR: Source/WebCore/style/StyleTreeResolver.cpp:524:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/style/StyleTreeResolver.cpp:526:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/style/StyleTreeResolver.cpp:530:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/style/StyleTreeResolver.h:113:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Commit Bot 2016-05-29 23:52:21 PDT
Comment on attachment 280073 [details]
Patch

Clearing flags on attachment: 280073

Committed r201497: <http://trac.webkit.org/changeset/201497>
Comment 7 WebKit Commit Bot 2016-05-29 23:52:23 PDT
All reviewed patches have been landed.  Closing bug.