Title: [193883] trunk/Source/WebKit2
- Revision
- 193883
- Author
- [email protected]
- Date
- 2015-12-09 18:50:31 -0800 (Wed, 09 Dec 2015)
Log Message
[iOS] Bail out if the page proxy is invalid when WebPageProxy::processWillBecome{Foreground, Suspended}() are called
https://bugs.webkit.org/show_bug.cgi?id=151877
Reviewed by Darin Adler.
We cannot assume that a WebPageProxy is in a valid state when WebPageProxy::processWillBecome{Foreground, Suspended}()
are called because these callbacks may occur after the web process crashed and before a
WebPageProxy attaches to a new web process (and hence is considered in a valid state).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processWillBecomeSuspended): Early return if the page proxy is invalid.
(WebKit::WebPageProxy::processWillBecomeForeground): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (193882 => 193883)
--- trunk/Source/WebKit2/ChangeLog 2015-12-10 01:18:08 UTC (rev 193882)
+++ trunk/Source/WebKit2/ChangeLog 2015-12-10 02:50:31 UTC (rev 193883)
@@ -1,3 +1,18 @@
+2015-12-09 Daniel Bates <[email protected]>
+
+ [iOS] Bail out if the page proxy is invalid when WebPageProxy::processWillBecome{Foreground, Suspended}() are called
+ https://bugs.webkit.org/show_bug.cgi?id=151877
+
+ Reviewed by Darin Adler.
+
+ We cannot assume that a WebPageProxy is in a valid state when WebPageProxy::processWillBecome{Foreground, Suspended}()
+ are called because these callbacks may occur after the web process crashed and before a
+ WebPageProxy attaches to a new web process (and hence is considered in a valid state).
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::processWillBecomeSuspended): Early return if the page proxy is invalid.
+ (WebKit::WebPageProxy::processWillBecomeForeground): Ditto.
+
2015-12-09 Commit Queue <[email protected]>
Unreviewed, rolling out r193864.
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (193882 => 193883)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-12-10 01:18:08 UTC (rev 193882)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-12-10 02:50:31 UTC (rev 193883)
@@ -4902,7 +4902,8 @@
#if PLATFORM(IOS)
void WebPageProxy::processWillBecomeSuspended()
{
- ASSERT(m_isValid);
+ if (!isValid())
+ return;
m_hasNetworkRequestsOnSuspended = m_pageLoadState.networkRequestsInProgress();
if (m_hasNetworkRequestsOnSuspended)
@@ -4911,7 +4912,8 @@
void WebPageProxy::processWillBecomeForeground()
{
- ASSERT(m_isValid);
+ if (!isValid())
+ return;
if (m_hasNetworkRequestsOnSuspended) {
setNetworkRequestsInProgress(true);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes