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

Unified Diff: chrome/browser/ui/browser_list.cc

Issue 6379009: [linux] Avoid crash when there's an X error during shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « chrome/browser/ui/browser_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 08a9d1dd07fc57bead857c04353f26aa46d16c45..8c7c1728c021f3f5cb810f4fd724a75f5823638d 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -393,7 +393,9 @@ void BrowserList::CloseAllBrowsersAndExit() {
void BrowserList::SessionEnding() {
// EndSession is invoked once per frame. Only do something the first time.
static bool already_ended = false;
- if (already_ended)
+ // We may get called in the middle of shutdown, e.g. http://crbug.com/70852
+ // In this case, do nothing.
+ if (already_ended || !NotificationService::current())
return;
already_ended = true;
« no previous file with comments | « chrome/browser/ui/browser_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698