Labs/Jetpack/Multi-Process

From MozillaWiki
< Labs‎ | Jetpack
Jump to: navigation, search

Multi-Process Jetpack

(See also MDC)

Jetpacks should be isolated from the system whenever possible. To this end, jetpacks should be isolated in processes similar to the way plugins and tabs will have their own process.

The jetpack API may be implemented by a combination of local JS and remote proxy objects, which will probably be XPOW (wrappers which reflect a JS object from one process into another).

Implementation plan:

  • Get basic bootstrap working, perhaps using threads instead of processes.
    • Hooking into the multi-process architecture may be more pain than it's worth up front. Instead do IPDL communication between two threads in the same process.
  • Get the jetpack working using a JPW for the `jetpack` object.
  • Find places where chrome and content holds references to jetpack objects which could then cause reference cycles.
  • Find places in the jetpack API where chrome makes synchronous calls to the jetpack and replace these with asynchronous mechanisms.

There are lots of intermediate steps in here... fill in as needed!