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

Unified Diff: chrome/browser/ui/browser.cc

Issue 10536106: Avoid crash in trying to access profile while shutting down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 23092ac59afe0b9100e439311850e8d4b0b1bcbc..65bda1ee2fd5c74c09e3a1b2dd9faccf930997b4 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3904,7 +3904,8 @@ void Browser::Observe(int type,
if (pref_name == prefs::kPrintingEnabled) {
UpdatePrintingState(GetContentRestrictionsForSelectedTab());
} else if (pref_name == prefs::kInstantEnabled) {
- if (!InstantController::IsEnabled(profile())) {
+ if (browser_shutdown::ShuttingDownWithoutClosingBrowsers() ||
Jói 2012/06/11 22:44:47 Don't you want the inverse condition?
sreeram 2012/06/11 22:53:03 No. If we are shutting down, the first clause retu
+ !InstantController::IsEnabled(profile())) {
if (instant()) {
instant()->DestroyPreviewContents();
instant_.reset();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698