Bug 133690

Summary: Factor repeated CFRunLoopObserver code out
Product: WebKit Reporter: Tim Horton <thorton>
Component: PlatformAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, mitz, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch simon.fraser: review+

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]
patch
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]
patch

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
http://trac.webkit.org/changeset/169775