Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2812743002: Revert of Keep track in the browser of which frames have onunload and onbeforeunload handlers. (Closed)
Patch Set: manual merge Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 40f1d41bf1a00133e5800dffefa5a0f652ebbbec..bcb62a6933e01d4bc174e07f1c9e296f732c8fb4 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1422,9 +1422,7 @@ void WebContentsImpl::WasUnOccluded() {
bool WebContentsImpl::NeedToFireBeforeUnload() {
// TODO(creis): Should we fire even for interstitial pages?
return WillNotifyDisconnection() && !ShowingInterstitialPage() &&
- !GetRenderViewHost()->SuddenTerminationAllowed() &&
- (GetMainFrame()->ShouldDispatchBeforeUnload() ||
- GetMainFrame()->ShouldDispatchUnload());
+ !GetRenderViewHost()->SuddenTerminationAllowed();
}
void WebContentsImpl::DispatchBeforeUnload() {

Powered by Google App Engine
This is Rietveld 408576698