forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mac] Better handling of lost Apple Events during App Shim Startup.
AESendMessage accepts a timeout argument, but it is effectively ignored by Mac. For asynchronous Apple Events (kAEQueueReply), kAEWantReceipt must also be set to receive a message on timeout. However, kAEWantReceipt is "Deprecated and unsupported in Mac OS X". Also, the "ping" apple event allows an app shim to ensure it doesn't try to connect to Chrome until it has finished starting up, when it is the shim that has just started Chrome. However, if Chrome is shutting down, the apple event is lost and the shim process must wait for a long timeout. Instead, if the shim itself is not launching Chrome, this CL proceeds straight to init. This will either succeed quickly, fail to connect to the shim socket, or connect and get disconnected quickly. Both "fail" cases are preferable to a timeout. For the Chrome-not-running case, we still can not leave zombie processes around that never get their Apple Event reply. For this case, emulate the broken Apple Event timeout by posting a DelayedTask to the UI MessageLoop in the app shim process. BUG=318013 TEST=With Chrome not running, Start App Launcher via dock icon then (really quickly) launch the app launcher again. Chrome must still be shutting down, and the Apple Event is lost. After 1 minute the App Launcher should work again. Review URL: https://codereview.chromium.org/68523004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234494 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
tapted@chromium.org
committed
Nov 12, 2013
1 parent
def4bce
commit 80da61e
Showing
1 changed file
with
54 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters