Index: chrome/browser/ui/views/frame/browser_view.cc |
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
index b184e79976eb2eb60b967db3bf5022f4e9a94be1..646dd9b4514ff10c16a3569e2c797377bf1dfadc 100644 |
--- a/chrome/browser/ui/views/frame/browser_view.cc |
+++ b/chrome/browser/ui/views/frame/browser_view.cc |
@@ -948,10 +948,12 @@ void BrowserView::SaveFocusedView() { |
} |
void BrowserView::DestroyBrowser() { |
- // Explicitly delete the BookmarkBarView now. That way we don't have to |
- // worry about the BookmarkBarView potentially outliving the Browser & |
- // Profile. |
+ // Explicitly delete the BookmarkBarView, DownloadShelfView and child views |
+ // owned by BrowserView before destroying |browser_|. That way we don't have |
+ // to worry about them potentially outliving the Browser & Profile. |
bookmark_bar_view_.reset(); |
+ download_shelf_.reset(); |
+ RemoveAllChildViews(true); |
browser_.reset(); |
} |