Title: [209646] trunk/Source/WebKit2
- Revision
- 209646
- Author
- bfulg...@apple.com
- Date
- 2016-12-09 19:25:40 -0800 (Fri, 09 Dec 2016)
Log Message
WebCore::Timer is not compatible with UIProcess
https://bugs.webkit.org/show_bug.cgi?id=165706
<rdar://problem/29360564>
Reviewed by Andy Estes.
Anders has explained to me (at least twice) that WebCore::Timer must not
be used in UIProcess code. A recent bug fix introduced a WebCore::Timer,
which led to another crash.
This patch switches from WebCore::Timer to WTF::RunLoop::Timer to avoid
the problem.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationState):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (209645 => 209646)
--- trunk/Source/WebKit2/ChangeLog 2016-12-10 03:07:01 UTC (rev 209645)
+++ trunk/Source/WebKit2/ChangeLog 2016-12-10 03:25:40 UTC (rev 209646)
@@ -1,3 +1,22 @@
+2016-12-09 Brent Fulgham <bfulg...@apple.com>
+
+ WebCore::Timer is not compatible with UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=165706
+ <rdar://problem/29360564>
+
+ Reviewed by Andy Estes.
+
+ Anders has explained to me (at least twice) that WebCore::Timer must not
+ be used in UIProcess code. A recent bug fix introduced a WebCore::Timer,
+ which led to another crash.
+
+ This patch switches from WebCore::Timer to WTF::RunLoop::Timer to avoid
+ the problem.
+
+ * UIProcess/Cocoa/NavigationState.h:
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::NavigationState):
+
2016-12-09 Eric Carlson <eric.carl...@apple.com>
Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (209645 => 209646)
--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h 2016-12-10 03:07:01 UTC (rev 209645)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h 2016-12-10 03:25:40 UTC (rev 209646)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,8 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NavigationState_h
-#define NavigationState_h
+#pragma once
#import "WKFoundation.h"
@@ -35,8 +34,8 @@
#import "PageLoadState.h"
#import "ProcessThrottler.h"
#import "WeakObjCPtr.h"
-#import <WebCore/Timer.h>
#import <wtf/RetainPtr.h>
+#import <wtf/RunLoop.h>
@class WKWebView;
@protocol WKHistoryDelegatePrivate;
@@ -205,7 +204,7 @@
#if PLATFORM(IOS)
ProcessThrottler::BackgroundActivityToken m_activityToken;
- WebCore::Timer m_releaseActivityTimer;
+ RunLoop::Timer<NavigationState> m_releaseActivityTimer;
#endif
};
@@ -212,5 +211,3 @@
} // namespace WebKit
#endif
-
-#endif // NavigationState_h
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (209645 => 209646)
--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2016-12-10 03:07:01 UTC (rev 209645)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2016-12-10 03:25:40 UTC (rev 209646)
@@ -93,7 +93,7 @@
, m_navigationDelegateMethods()
, m_historyDelegateMethods()
#if PLATFORM(IOS)
- , m_releaseActivityTimer(*this, &NavigationState::releaseNetworkActivityToken)
+ , m_releaseActivityTimer(RunLoop::current(), this, &NavigationState::releaseNetworkActivityToken)
#endif
{
ASSERT(m_webView->_page);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes