| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 8fec4e016f74d876e583b6f6ecb8f34c8dbbc3d3..2202c444284ab7db5aa329546097014dbf092f5f 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -2705,7 +2705,8 @@ void WebContentsImpl::RenderViewCreated(RenderViewHost* render_view_host) {
|
| // Don't send notifications if we are just creating a swapped-out RVH for
|
| // the opener chain. These won't be used for view-source or WebUI, so it's
|
| // ok to return early.
|
| - if (static_cast<RenderViewHostImpl*>(render_view_host)->is_swapped_out())
|
| + if (static_cast<RenderViewHostImpl*>(render_view_host)->rvh_state() ==
|
| + RenderViewHostImpl::RVH_STATE_SWAPPED_OUT)
|
| return;
|
|
|
| if (delegate_)
|
| @@ -3126,7 +3127,8 @@ void WebContentsImpl::RequestOpenURL(RenderViewHost* rvh,
|
| bool user_gesture) {
|
| // If this came from a swapped out RenderViewHost, we only allow the request
|
| // if we are still in the same BrowsingInstance.
|
| - if (static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out() &&
|
| + if (static_cast<RenderViewHostImpl*>(rvh)->rvh_state() ==
|
| + RenderViewHostImpl::RVH_STATE_SWAPPED_OUT &&
|
| !rvh->GetSiteInstance()->IsRelatedSiteInstance(GetSiteInstance())) {
|
| return;
|
| }
|
| @@ -3296,7 +3298,8 @@ void WebContentsImpl::RunJavaScriptMessage(
|
| // showing an interstitial as it's shown over the previous page and we don't
|
| // want the hidden page's dialogs to interfere with the interstitial.
|
| bool suppress_this_message =
|
| - static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out() ||
|
| + static_cast<RenderViewHostImpl*>(rvh)->rvh_state() ==
|
| + RenderViewHostImpl::RVH_STATE_SWAPPED_OUT ||
|
| ShowingInterstitialPage() ||
|
| !delegate_ ||
|
| delegate_->ShouldSuppressDialogs() ||
|
| @@ -3341,7 +3344,7 @@ void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh,
|
| delegate_->WillRunBeforeUnloadConfirm();
|
|
|
| bool suppress_this_message =
|
| - rvhi->is_swapped_out() ||
|
| + rvhi->rvh_state() != RenderViewHostImpl::RVH_STATE_LIVE ||
|
| !delegate_ ||
|
| delegate_->ShouldSuppressDialogs() ||
|
| !delegate_->GetJavaScriptDialogManager();
|
|
|