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 #
Messages
Total messages: 8 (0 generated)
|