diff options
Diffstat (limited to 'Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm')
| -rw-r--r-- | Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm b/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm index 5293c4889..b5fc012c9 100644 --- a/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm +++ b/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm @@ -144,8 +144,10 @@ static NSRect convertRectToScreen(NSWindow *window, NSRect rect) // If the page doesn't respond in DefaultWatchdogTimerInterval seconds, it could be because // the WebProcess has hung, so exit anyway. - if (!_watchdogTimer) - _watchdogTimer = adoptNS([NSTimer scheduledTimerWithTimeInterval:DefaultWatchdogTimerInterval target:self selector:@selector(exitFullScreen) userInfo:nil repeats:NO]); + if (!_watchdogTimer) { + _watchdogTimer = adoptNS([[NSTimer alloc] initWithFireDate:nil interval:DefaultWatchdogTimerInterval target:self selector:@selector(exitFullScreen) userInfo:nil repeats:NO]); + [[NSRunLoop mainRunLoop] addTimer:_watchdogTimer.get() forMode:NSDefaultRunLoopMode]; + } } #pragma mark - |
