Bug 133690 - Factor repeated CFRunLoopObserver code out
Summary: Factor repeated CFRunLoopObserver code out
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
Depends on:
Reported: 2014-06-10 12:44 PDT by Tim Horton
Modified: 2014-06-10 15:31 PDT (History)
5 users (show)

See Also:

patch (24.56 KB, patch)
2014-06-10 12:48 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-06-10 12:44:10 PDT
I keep copying around CFRunLoopObserver code, including fun constants like the CA commit run loop order.

Let's put this code in one place.
Comment 1 Tim Horton 2014-06-10 12:48:51 PDT
Created attachment 232805 [details]
Comment 2 Tim Horton 2014-06-10 12:49:05 PDT
I'm going to add another use of this soon, that's why I wanted to do this now.
Comment 3 WebKit Commit Bot 2014-06-10 12:50:45 PDT
Attachment 232805 [details] did not pass style-queue:

ERROR: Source/WebCore/platform/cf/RunLoopObserver.h:41:  The parameter name "callback" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 12 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Simon Fraser (smfr) 2014-06-10 14:51:10 PDT
Comment on attachment 232805 [details]

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

> Source/WebCore/platform/cf/RunLoopObserver.h:39
> +    typedef std::function<void ()> RunLoopObserverCallback;

Maybe the callback should take a RunLoopObserver&?
Comment 5 Anders Carlsson 2014-06-10 15:16:50 PDT
(In reply to comment #4)
> Maybe the callback should take a RunLoopObserver&?

No need - you can just capture RunLoopObserver.
Comment 6 Tim Horton 2014-06-10 15:31:08 PDT