gecko-dev/ipc
Nicolas B. Pierron a4aef929a1 Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld
This change adds the ground work to share content provided by the JS engine of
the Parent process to initialize the JS engine of other threads and Content
processes.

The singleton class xpc::SelfHostedShmem is used to wrap the logic behind
holding the memory. The memory is initialized with `InitFromParent` or
`InitFromChild`. The memory is accessible using either the `Content` or
`Handle`.

The shared memory is transfered through the command line using
`mozilla::ipc::ExportSharedJSInit` and read using
`mozilla::ipc::ImportSharedJSInit` functions. The command line is used, as we
need the shared memory to be avilable for the JS engine initialization. The
command line is composed of a single command named `-jsInit` which is followed
by the handle (on Windows) and the length of the shared content.

The memory associated with the shared memory is cleared in `ShutdownXPCOM` after
closing all threads, and shuting down the JS engine. This is necessary as we
expect the JS engine to borrow content from the shared memory.

Differential Revision: https://phabricator.services.mozilla.com/D110576
2021-05-12 13:57:55 +00:00
..
app Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
chromium Bug 1709893 - Part 3: Remove unused method from ChildProcessHost, r=ipc-reviewers,mccr8 2021-05-07 13:56:51 +00:00
contentproc
glue Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld 2021-05-12 13:57:55 +00:00
gtest
ipdl Bug 1672726 - Part 2: Support dispatching synthesized touch events through parent process; r=ipc-reviewers,botond,nika 2021-04-22 16:01:26 +00:00
mscom Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre 2021-05-10 07:15:07 +00:00
testshell Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8 2021-03-05 15:29:49 +00:00
moz.build
pull-chromium.py