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

Unified Diff: chrome/browser/ui/views/notifications/balloon_view_views.cc

Issue 11414215: Add CloseAllByProfile to NotificationUIManager and call before destroyng a Profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac Created 8 years, 1 month 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/notifications/balloon_view_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/notifications/balloon_view_views.cc
diff --git a/chrome/browser/ui/views/notifications/balloon_view_views.cc b/chrome/browser/ui/views/notifications/balloon_view_views.cc
index 7abdcaa027b0b8a66fc54a1ffef863f731eb8943..6f501835b2e3ecbeb040eb6b621f1eeaa16da0a5 100644
--- a/chrome/browser/ui/views/notifications/balloon_view_views.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view_views.cc
@@ -116,8 +116,10 @@ BalloonViewImpl::~BalloonViewImpl() {
void BalloonViewImpl::Close(bool by_user) {
animation_->Stop();
- html_contents_->Shutdown();
- // Detach contents from widget before then close.
+ // Destroy html_contents_ here since it relies on Profile which might get
+ // deleted before the destructor is called when the views are torn down.
+ html_contents_.reset();
+ // Detach contents from the widget before they close.
// This is necessary because a widget may be deleted
// after this when chrome is shutting down.
html_container_->GetRootView()->RemoveAllChildViews(true);
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698