[iOS] Bail out if the page proxy is invalid when WebPageProxy::processWillBecome...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Dec 2015 02:50:31 +0000 (02:50 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Dec 2015 02:50:31 +0000 (02:50 +0000)
commitcb4f048dc164625fd0ac4d4410684819d4a4335e
tree11b84832ada1709c4b5dded3d2c24d70a97c56a0
parent557f87edd4c0912ee51a02afde9f36a3500d0f8a
[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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp