diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 12:28:32 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 12:28:32 +0000 |
commit | b88a7498e267ac265b141a2c7693cc37a55c4e9b (patch) | |
tree | 9a27b031d474def81658bdadad42ed05778af6d5 /remoting | |
parent | 35e55bffc4738b3dbd68be3f01aa918e56133bc8 (diff) | |
download | chromium_src-b88a7498e267ac265b141a2c7693cc37a55c4e9b.zip chromium_src-b88a7498e267ac265b141a2c7693cc37a55c4e9b.tar.gz chromium_src-b88a7498e267ac265b141a2c7693cc37a55c4e9b.tar.bz2 |
[Mac] Replace the existing browser-child mach ipc with a long-lived listener on a well-known port.
Before this CL:
Before fork()ing a child, the browser process creates a mach receive port with a random name. After the fork() but before exec(), the child uses mach ipc to transmit send rights to its task port. The child has access to the random name because it inherits it from the browser process. Unfortunately, some of the library functions involved in sending a mach message are not safe to call after fork().
After this CL:
Before forking the first child, the browser spins off a new thread that listens on a well-known port for mach ipc from any process. This well-known port is "com.google.Chrome.<browserpid>". When a child process starts up, it sends a mach message to its parent browser's well-known port. On the browser side, we listen for said message, extract the pid of the sending process, and ignore any messages from processes we did not personally fork(). This check is necessary because any arbitrary process on the system could send mach ipc to that port.
BUG=35374
TEST=Browser should still start up. The task manager should still show correct cpu/memory data. There should be no perf regressions.
TEST=Mac ui_tests and browser_tests should be less flaky.
Review URL: http://codereview.chromium.org/3443002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
0 files changed, 0 insertions, 0 deletions