Bug 158196 - Transition various Task/Function queues from std::function to NoncopyableFunction
Summary: Transition various Task/Function queues from std::function to NoncopyableFunc...
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: 158173
  Show dependency treegraph
 
Reported: 2016-05-29 22:16 PDT by Brady Eidson
Modified: 2016-05-29 23:52 PDT (History)
2 users (show)

See Also:


Attachments
Patch (17.78 KB, patch)
2016-05-29 22:22 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (13.81 KB, patch)
2016-05-29 23:07 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-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.