Bug 142765

Summary: Don't pass nil as a fireDate for NSTimer
Product: WebKit Reporter: Conrad Shultz <conrad_shultz>
Component: WebKit2Assignee: Conrad Shultz <conrad_shultz>
Status: RESOLVED FIXED    
Severity: Normal CC: conrad_shultz
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Description Conrad Shultz 2015-03-16 19:15:01 PDT
WKFullScreenWindowController uses nil as the fireDate for a deferred one-shot timer. It shouldn't.
Comment 1 Conrad Shultz 2015-03-16 19:15:40 PDT
<rdar://problem/20149806>
Comment 2 Conrad Shultz 2015-03-16 19:46:34 PDT
Created attachment 248784 [details]
Patch
Comment 3 mitz 2015-03-16 19:49:29 PDT
Comment on attachment 248784 [details]
Patch

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

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:75
> +- (void)_watchdogTimerFired:(NSTimer *)timer;

I don’t think this is necessary anymore.

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:678
> +    ASSERT_ARG(timer, timer == _watchdogTimer);

I can’t remember a single time this kind of assertion was useful.
Comment 4 Conrad Shultz 2015-03-16 19:57:31 PDT
(In reply to comment #3)
> Comment on attachment 248784 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=248784&action=review
> 
> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:75
> > +- (void)_watchdogTimerFired:(NSTimer *)timer;
> 
> I don’t think this is necessary anymore.

As of Xcode 4.3, correct. I only added it to parallel the other methods; removed.

> 
> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:678
> > +    ASSERT_ARG(timer, timer == _watchdogTimer);
> 
> I can’t remember a single time this kind of assertion was useful.

Removed.
Comment 5 Conrad Shultz 2015-03-16 19:58:49 PDT
Committed r181607: <http://trac.webkit.org/changeset/181607>