Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.h

Issue 2041213002: Address a crash under -[NSWindow close] via a WeakPtr PostTask from Browser::TabStripEmpty() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to patchset 2 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_cocoa.h
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index a4f276f03feff57a3a79b0214231437acbbc5dce..7bf4b317b02294bfa659ee1afa26ad9eb678733a 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -172,6 +172,9 @@ class BrowserWindowCocoa
// the window's title to reflect that.
void UpdateAlertState(TabAlertState alert_state);
+ // Called when the controller's window invokes -onWindowWillClose:.
Robert Sesek 2016/06/08 02:00:32 nit: just windowWillClose: (and on line 206).
tapted 2016/06/08 02:47:27 Whoops - Done. (I noticed you updated the CL descr
+ void OnWindowWillClose();
+
// Returns the cocoa-world BrowserWindowController
BrowserWindowController* cocoa_controller() { return controller_; }
@@ -199,6 +202,10 @@ class BrowserWindowCocoa
// which can be audio playing, muting or none (determined by alert state of
// tabs.
TabAlertState alert_state_;
+
+ // True when the controlled window invokes -onWindowWillClose:, and it may no
+ // longer be safe to access [controller_ window].
+ bool window_closed_;
};
#endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698