| Index: chrome/browser/chrome_browser_application_mac.mm
|
| ===================================================================
|
| --- chrome/browser/chrome_browser_application_mac.mm (revision 160934)
|
| +++ chrome/browser/chrome_browser_application_mac.mm (working copy)
|
| @@ -331,14 +331,15 @@
|
| // Termination is cancelled by resetting this flag. The standard
|
| // |-applicationShouldTerminate:| is not supported, and code paths leading to it
|
| // must be redirected.
|
| +//
|
| +// When the last browser has been destroyed, the BrowserList calls
|
| +// browser::OnAppExiting(), which is the point of no return. That will cause
|
| +// the NSApplicationWillTerminateNotification to be posted, which ends the
|
| +// NSApplication event loop, so final post- MessageLoop::Run() work is done
|
| +// before exiting.
|
| - (void)terminate:(id)sender {
|
| AppController* appController = static_cast<AppController*>([NSApp delegate]);
|
| - if ([appController tryToTerminateApplication:self]) {
|
| - [[NSNotificationCenter defaultCenter]
|
| - postNotificationName:NSApplicationWillTerminateNotification
|
| - object:self];
|
| - }
|
| -
|
| + [appController tryToTerminateApplication:self];
|
| // Return, don't exit. The application is responsible for exiting on its own.
|
| }
|
|
|
|
|