From 41741a96ce6b7b3cfca3d59ef3bb59064dc939e0 Mon Sep 17 00:00:00 2001 From: "pinkerton@chromium.org" Date: Wed, 18 Feb 2009 21:51:39 +0000 Subject: Fix window close and application quit on Mac to call the proper Browser machinery in the proper order. Add comments to BrowserWindow::Close to stress its assumptions. DCHECK that nobody adds a NULL browser to the browser list. Review URL: http://codereview.chromium.org/20460 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9973 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_window.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chrome/browser/browser_window.h') diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index 902cbf5..6a1215f 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -37,7 +37,11 @@ class BrowserWindow { // Closes the frame as soon as possible. If the frame is not in a drag // session, it will close immediately; otherwise, it will move offscreen (so - // events are still fired) until the drag ends, then close. + // events are still fired) until the drag ends, then close. This assumes + // that the Browser is not immediately destroyed, but will be eventually + // destroyed by other means (eg, the tab strip going to zero elements). + // Bad things happen if the Browser dtor is called directly as a result of + // invoking this method. virtual void Close() = 0; // Activates (brings to front) the window. Restores the window from minimized -- cgit v1.1