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

Unified Diff: chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc

Issue 154633003: Attempt at fixing possible shutdown crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OnWindowDestroying Created 6 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 | « chrome/browser/ui/views/frame/browser_view_browsertest.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
diff --git a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
index 8b5bb71a8b588014f49fd32c8a3a52fe4afc7d19..473f1169366872164e449c2eab5d2d1bb4b5bdcc 100644
--- a/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
+++ b/chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc
@@ -6,6 +6,7 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/views/frame/browser_desktop_root_window_host.h"
+#include "chrome/browser/ui/views/frame/browser_shutdown.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/desktop_user_action_handler_aura.h"
#include "grit/chromium_strings.h"
@@ -46,6 +47,10 @@ DesktopBrowserFrameAura::~DesktopBrowserFrameAura() {
// DesktopBrowserFrameAura, views::DesktopNativeWidgetAura overrides:
void DesktopBrowserFrameAura::OnHostClosed() {
+ // Destroy any remaining WebContents early on. Doing so may result in
+ // calling back to one of the Views/LayoutManagers or supporting classes of
+ // BrowserView. By destroying here we ensure all said classes are valid.
+ DestroyBrowserWebContents(browser_view_->browser());
aura::client::SetVisibilityClient(GetNativeView()->GetRootWindow(), NULL);
DesktopNativeWidgetAura::OnHostClosed();
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_browsertest.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698