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

Issue 11066035: [Mac] During shutdown, do not post NSApplicationWillTerminateNotification twice. (Closed)

Created:
8 years, 2 months ago by Robert Sesek
Modified:
8 years, 2 months ago
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

[Mac] During shutdown, do not post NSApplicationWillTerminateNotification twice. In the quit path where zero browser windows are open, -[BrowserCrApplication terminate:] was posting NSApplicationWillTerminateNotification twice, via the stacks pasted on the bug. Some system code assumes that after posting this notification, _exit() will be called and so it does not bother removing itself as an observer, which leads to a shutdown crash. This change makes it so that browser::HandleAppExitingForPlatform() is responsible for posting the notification. That function is called via browser::OnAppExiting(), which is the final step in the cross-platform shutdown code. At that time, all browsers have been closed and shutdown cannot be aborted, so this should only ever be called once. BUG=153283 TEST=Prayer and a sacrificial goat. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=160443

Patch Set 1 #

Total comments: 2

Patch Set 2 : kill_me_now #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -8 lines) Patch
M chrome/browser/chrome_browser_application_mac.mm View 1 chunk +7 lines, -6 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime_mac.mm View 1 1 chunk +29 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Robert Sesek
mark/trung: review shess: see if you can actually get trung to review, or just review ...
8 years, 2 months ago (2012-10-05 01:12:37 UTC) #1
Mark Mentovai
LGTM
8 years, 2 months ago (2012-10-05 18:14:53 UTC) #2
Scott Hess - ex-Googler
Hellifiknow. https://codereview.chromium.org/11066035/diff/1/chrome/browser/lifetime/application_lifetime_mac.mm File chrome/browser/lifetime/application_lifetime_mac.mm (right): https://codereview.chromium.org/11066035/diff/1/chrome/browser/lifetime/application_lifetime_mac.mm#newcode35 chrome/browser/lifetime/application_lifetime_mac.mm:35: void HandleAppExitingForPlatform() { static bool kill_me_now = false; ...
8 years, 2 months ago (2012-10-05 19:04:41 UTC) #3
Robert Sesek
https://codereview.chromium.org/11066035/diff/1/chrome/browser/lifetime/application_lifetime_mac.mm File chrome/browser/lifetime/application_lifetime_mac.mm (right): https://codereview.chromium.org/11066035/diff/1/chrome/browser/lifetime/application_lifetime_mac.mm#newcode35 chrome/browser/lifetime/application_lifetime_mac.mm:35: void HandleAppExitingForPlatform() { On 2012/10/05 19:04:41, shess wrote: > ...
8 years, 2 months ago (2012-10-05 19:10:43 UTC) #4
Scott Hess - ex-Googler
Well, you still aren't going to get a LGTM from me on this, unless you ...
8 years, 2 months ago (2012-10-05 19:13:19 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsesek@chromium.org/11066035/4
8 years, 2 months ago (2012-10-05 19:15:46 UTC) #6
commit-bot: I haz the power
Presubmit check for 11066035-4 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 2 months ago (2012-10-05 19:15:48 UTC) #7
Robert Sesek
8 years, 2 months ago (2012-10-05 19:15:49 UTC) #8
On 2012/10/05 19:13:19, shess wrote:
> Well, you still aren't going to get a LGTM from me on this, unless you resort
to
> underhanded trickery.

I'll count yours as a 0.5.

Powered by Google App Engine
This is Rietveld 408576698