⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181607 in webkit


Ignore:
Timestamp:
Mar 16, 2015, 7:58:07 PM (11 years ago)
Author:
Conrad Shultz
Message:

Don't pass nil as a fireDate for NSTimer
https://bugs.webkit.org/show_bug.cgi?id=142765

Reviewed by Dan Bernstein.

While we're here, switch to a selector that conforms to documented NSTimer API.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController cancelOperation:]):
Set the timer's fireDate as the future date matching the former interval; update the selector.
(-[WKFullScreenWindowController _watchdogTimerFired:]):
Timer callback; wrap -exitFullScreen.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r181601 r181607  
     12015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
     2
     3        Don't pass nil as a fireDate for NSTimer
     4        https://bugs.webkit.org/show_bug.cgi?id=142765
     5
     6        Reviewed by Dan Bernstein.
     7
     8        While we're here, switch to a selector that conforms to documented NSTimer API.
     9
     10        * UIProcess/mac/WKFullScreenWindowController.mm:
     11        (-[WKFullScreenWindowController cancelOperation:]):
     12        Set the timer's fireDate as the future date matching the former interval; update the selector.
     13        (-[WKFullScreenWindowController _watchdogTimerFired:]):
     14        Timer callback; wrap -exitFullScreen.
     15
    1162015-03-16  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

    r180885 r181607  
    155155    if (!_watchdogTimer) {
    156156        [self _manager]->requestExitFullScreen();
    157         _watchdogTimer = adoptNS([[NSTimer alloc] initWithFireDate:nil interval:DefaultWatchdogTimerInterval target:self selector:@selector(exitFullScreen) userInfo:nil repeats:NO]);
     157        _watchdogTimer = adoptNS([[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:DefaultWatchdogTimerInterval] interval:0 target:self selector:@selector(_watchdogTimerFired:) userInfo:nil repeats:NO]);
    158158        [[NSRunLoop mainRunLoop] addTimer:_watchdogTimer.get() forMode:NSDefaultRunLoopMode];
    159159    }
     
    672672    NSEnableScreenUpdates();
    673673}
     674
     675- (void)_watchdogTimerFired:(NSTimer *)timer
     676{
     677    [self exitFullScreen];
     678}
     679
    674680@end
    675681
Note: See TracChangeset for help on using the changeset viewer.