summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 16:25:41 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 16:25:41 +0000
commit4d0e9e6625cb72c6091087cba9049ffac5cbf0d3 (patch)
tree62489948cd0715cd6eedb5ff00d39a9794da0b8f /chrome/browser
parent810d6408e8553435b97151805a9ed48ffe8d610e (diff)
downloadchromium_src-4d0e9e6625cb72c6091087cba9049ffac5cbf0d3.zip
chromium_src-4d0e9e6625cb72c6091087cba9049ffac5cbf0d3.tar.gz
chromium_src-4d0e9e6625cb72c6091087cba9049ffac5cbf0d3.tar.bz2
Make sure we call orderOut: before calling performClose:. This ensures the window is hidden immediately so we don't see any teardown that may ensure.
BUG=23959 TEST=closing windows with lots of tabs, quitting with lots of tabs. dragging while windows close. Review URL: http://codereview.chromium.org/264022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28542 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/cocoa/browser_window_cocoa.mm7
-rw-r--r--chrome/browser/cocoa/tab_window_controller.mm5
2 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm
index a9d256a..6ab8128 100644
--- a/chrome/browser/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/cocoa/browser_window_cocoa.mm
@@ -60,8 +60,13 @@ void BrowserWindowCocoa::Close() {
// still close the window, as that will happen when the drag completes.
if ([controller_ overlayWindow])
[controller_ deferPerformClose];
- else
+ else {
+ // Make sure we hide the window immediately. Even though performClose:
+ // calls orderOut: eventually, it leaves the window on-screen long enough
+ // that we start to see tabs shutting down. http://crbug.com/23959
+ [window_ orderOut:controller_];
[window_ performClose:controller_];
+ }
}
void BrowserWindowCocoa::Activate() {
diff --git a/chrome/browser/cocoa/tab_window_controller.mm b/chrome/browser/cocoa/tab_window_controller.mm
index 7ca47ea..2d02e70 100644
--- a/chrome/browser/cocoa/tab_window_controller.mm
+++ b/chrome/browser/cocoa/tab_window_controller.mm
@@ -42,8 +42,11 @@
- (void)removeOverlay {
[self setUseOverlay:NO];
- if (closeDeferred_)
+ if (closeDeferred_) {
+ // See comment in BrowserWindowCocoa::Close() about orderOut:.
+ [[self window] orderOut:self];
[[self window] performClose:self]; // Autoreleases the controller.
+ }
}
// TODO(pinkerton): Nobody calls this, can we remove it?