Chromium Code Reviews| 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 ff003ddb3c808f2ecd7ce45abb86207620d9d2bd..a4b3a4c6e773520cc0945810b12d3656512cbd9d 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -1101,8 +1101,8 @@ bool WebContentsImpl::NeedToFireBeforeUnload() { |
| // TODO(creis): Should we fire even for interstitial pages? |
| return WillNotifyDisconnection() && |
| !ShowingInterstitialPage() && |
| - !static_cast<RenderViewHostImpl*>( |
| - GetRenderViewHost())->SuddenTerminationAllowed(); |
| + !static_cast<RenderFrameHostImpl*>( |
| + GetMainFrame())->SuddenTerminationAllowed(); |
|
Charlie Reis
2015/01/29 23:20:41
This doesn't seem quite right to me. What if the
clamy
2015/02/02 16:16:27
RenderFrameHostImpl::DispatchBeforeUnload skips ex
|
| } |
| void WebContentsImpl::DispatchBeforeUnload(bool for_cross_site_transition) { |
| @@ -4035,7 +4035,7 @@ void WebContentsImpl::RendererUnresponsive(RenderViewHost* render_view_host) { |
| rfhi->IsWaitingForUnloadACK()) { |
| // Hang occurred while firing the beforeunload/unload handler. |
| // Pretend the handler fired so tab closing continues as if it had. |
| - rvhi->set_sudden_termination_allowed(true); |
| + rfhi->set_override_sudden_termination_status(true); |
|
Charlie Reis
2015/01/29 23:20:42
Again, this is only the main frame. We'll eventua
clamy
2015/02/02 16:16:27
Done.
|
| if (!GetRenderManager()->ShouldCloseTabOnUnresponsiveRenderer()) |
| return; |