diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 20:06:10 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 20:06:10 +0000 |
commit | e79be82cceadda8fd3cf53993493f51ac4cc4036 (patch) | |
tree | 3c9ee8e2dc58b4492f32b4ebda219ef0848176a5 /chrome | |
parent | 2d84d4d76a8eff6770bb4e28a064610c96055495 (diff) | |
download | chromium_src-e79be82cceadda8fd3cf53993493f51ac4cc4036.zip chromium_src-e79be82cceadda8fd3cf53993493f51ac4cc4036.tar.gz chromium_src-e79be82cceadda8fd3cf53993493f51ac4cc4036.tar.bz2 |
[Mac] Prevent browser window from re-displaying when partially shut down.
http://crbug.com/24734
TEST=Start Chrome, Command-o, Command-q, should quit cleanly.
TEST=download a file. Should be able to Quit the browser cleanly.
TEST=Open two windows with one tab apiece. Drag one to the other. Should not crash.
Review URL: http://codereview.chromium.org/295028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm index 1fa62b1..c9edfab 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -259,6 +259,14 @@ willPositionSheet:(NSWindow*)sheet // semantics of BrowserWindow::Close() and not call the Browser's dtor directly // from this method. - (void)windowWillClose:(NSNotification*)notification { + // Don't update the window any longer. + // TODO(shess,dmaclach): This is a work-around for some cases where + // the window's views were living longer than this controller, and + // were then being re-displayed. Better would be to have it live + // the appropriate amount of time, at which point we can remove + // this. [And perhaps the funky -autorelease below can be fixed.] + [window_ setAutodisplay:NO]; + DCHECK(!browser_->tabstrip_model()->count()); // We can't actually use |-autorelease| here because there's an embedded |