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

Unified Diff: chrome/browser/devtools/devtools_window.cc

Issue 2695233003: Fix unload controller. (Closed)
Patch Set: Fix DevToolsWindow behaviour on closing. Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/lifetime/browser_close_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_window.cc
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index a2d355ea3bc2bdb5fe9f10edec80d39e1141a8b1..0def0d275fb1578dc4115323278024b5825bb312 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -770,7 +770,8 @@ bool DevToolsWindow::NeedsToInterceptBeforeUnload(
WebContents* contents) {
DevToolsWindow* window =
DevToolsWindow::GetInstanceForInspectedWebContents(contents);
- return window && !window->intercepted_page_beforeunload_;
+ return window && !window->intercepted_page_beforeunload_ &&
+ window->life_stage_ != kClosing;
Michael K. (Yandex Team) 2017/03/01 13:48:52 On closing NeedsToInterceptBeforeUnload(..) should
dgozman 2017/03/01 19:39:48 Should we do |window->life_stage_ == kLoadComplete
Michael K. (Yandex Team) 2017/03/02 04:28:47 I think you are right. I'll make a new patchset.
}
// static
« no previous file with comments | « no previous file | chrome/browser/lifetime/browser_close_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698