summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 05:18:21 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 05:18:21 +0000
commitc581b398d39788705b80bdff5820138ec0510bc8 (patch)
tree6da9366e66be634f7555e4a09ab8f2b77e1b1b9f /chrome/browser/views/frame
parent20452671d2890ad7464dea6086458b0b0ede81a3 (diff)
downloadchromium_src-c581b398d39788705b80bdff5820138ec0510bc8.zip
chromium_src-c581b398d39788705b80bdff5820138ec0510bc8.tar.gz
chromium_src-c581b398d39788705b80bdff5820138ec0510bc8.tar.bz2
Fix browser window crash on windows.
BUG=13681 (http://crbug.com/13681) TEST=Follow these steps -Ctrl+Shift+N to Incognito window. -Download a file -Close the Incognito window after download is finished. Review URL: http://codereview.chromium.org/120001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r--chrome/browser/views/frame/browser_view.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 2a6ea40..16e2e98 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -294,6 +294,9 @@ BrowserView::~BrowserView() {
ticker_.Stop();
ticker_.UnregisterTickHandler(&hung_window_detector_);
#endif
+
+ // Explicitly set browser_ to NULL
+ browser_.reset();
}
// static
@@ -801,6 +804,11 @@ void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
}
void BrowserView::SetDownloadShelfVisible(bool visible) {
+ // This can be called from the superclass destructor, when it destroys our
+ // child views. At that point, browser_ is already gone.
+ if (browser_ == NULL)
+ return;
+
if (IsDownloadShelfVisible() != visible) {
if (visible) {
// Invoke GetDownloadShelf to force the shelf to be created.