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

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

Issue 7294006: Try to bandaid leaks due to TabContentsWrapper not force-closing all InfoBarDelegates on shutdown... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/browser/tab_contents/infobar_container.cc ('k') | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
===================================================================
--- chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (revision 91189)
+++ chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (working copy)
@@ -177,6 +177,10 @@
// Destroy all remaining InfoBars. It's important to not animate here so that
// we guarantee that we'll delete all delegates before we do anything else.
+ //
+ // TODO(pkasting): If there is no InfoBarContainer, this leaks all the
+ // InfoBarDelegates. This will be fixed once we call CloseSoon() directly on
+ // Infobars.
RemoveAllInfoBars(false);
}
@@ -361,7 +365,6 @@
}
void TabContentsWrapper::RenderViewGone() {
- // Remove all infobars.
RemoveAllInfoBars(true);
// Tell the view that we've crashed so it can prepare the sad tab page.
@@ -469,7 +472,6 @@
for (size_t i = 0; i < infobars_.size(); ++i) {
if (GetInfoBarDelegateAt(i)->EqualsDelegate(delegate)) {
- // Tell the new infobar to close so that it can clean itself up.
delegate->InfoBarClosed();
return;
}
@@ -651,8 +653,7 @@
infobars_.erase(infobars_.begin() + i);
// Remove ourselves as an observer if we are tracking no more InfoBars.
if (infobars_.empty()) {
- registrar_.Remove(
- this, NotificationType::NAV_ENTRY_COMMITTED,
+ registrar_.Remove(this, NotificationType::NAV_ENTRY_COMMITTED,
Source<NavigationController>(&tab_contents_->controller()));
}
}
« no previous file with comments | « chrome/browser/tab_contents/infobar_container.cc ('k') | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698