зеркало из https://github.com/mozilla/gecko-dev.git
a4aef929a1
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 |
||
---|---|---|
.. | ||
app | ||
chromium | ||
contentproc | ||
glue | ||
gtest | ||
ipdl | ||
mscom | ||
testshell | ||
moz.build | ||
pull-chromium.py |