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

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

Issue 266343002: Unload all apps / extensions when deleting a profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address sky comments Created 6 years, 7 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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 141171682af4670513c70420410e98df986bd513..ff7eabe648e371aea1f450e3556063624aa7cb0c 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -447,6 +447,11 @@ Browser::Browser(const CreateParams& params)
}
Browser::~Browser() {
+ // Stop observing notifications before continuing with destruction. Profile
+ // destruction will unload extensions and reentrant calls to Browser:: should
+ // be avoided while it is being torn down.
+ registrar_.RemoveAll();
+
// The tab strip should not have any tabs at this point.
DCHECK(tab_strip_model_->empty());
tab_strip_model_->RemoveObserver(this);

Powered by Google App Engine
This is Rietveld 408576698