DescriptionAvoid a thread hop when initializing IPC to new processes
ChildProcessLauncher waits until receiving a successful launch
notification on its host thread before completing the low-level
IPC pipe connection to a new child process.
This means that even after a process is successfully launched
on the launcher thread, we must wait until a task can run on
the host thread (UI or IO, typically) before the new child
process's main thread can be unblocked (it's waiting on a sync
broker message to initialize IPC).
This CL instead begins browser-side initialization of IPC as
soon as the new process handle is known (synchronously after
LaunchProcess on most platforms, async on the launcher thread
for Android).
We still incur the cost of an internal PostTask to the IO thread
within the EDK before browser-side initialization can complete,
but that can be removed in a future CL.
This takes advantage of the new PendingProcessConnection EDK API
to ensure safe handling of any potential failure cases.
BUG=682794
Patch Set 1 #Patch Set 2 : . #
Depends on Patchset: Messages
Total messages: 10 (10 generated)
|