DescriptionMerge 160443 - [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.
Review URL: https://codereview.chromium.org/11066035
TBR=rsesek@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=160936
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|