Contents

Disable Content Processes

Disable content processes for extensions which are broken until they can be ported. This could be managed with a install manifest flag, similar to <em:unpack> in Firefox 4.

Rewrite Popular Extensions

Spend Firefox engineering time porting (or helping to port/review) the top N extensions to use the message manager. This is what the mobile team did for Adblock Plus.

Wrappers

The most invasive compatibility change would be to implement a wrapper so that extensions could continue to synchronously access content objects. The basic wrapper code is already available (CPOWs), but there are many different degrees of compatibility which affect the amount of engineering time, risk, and actual extension compatibility.

The fundamental disadvantage of a synchronous wrapper is that it allows the Firefox UI to become blocked on content, which can negate the benefits of the content process.

In terms of implementation, any synchronous call will require some significant auditing and rewriting of the existing process implementation: synchronous calls mean that IPDL messages can be delivered in surprising orders within nested event loops. Either the IPDL layer or the client code (networking and others) will require auditing and fixing. This is risky because the bugs would only surface intermittently and only when using these wrappers.

Because it is easy to leak permanently with cross-process cycles, we have a rule in place that content may not hold a reference to chrome objects. This means that some patterns that extensions use may still not work, even with wrappers. e.g.

This limitation could be solved by implementing a cross-process cycle collector, but that would be a very significant project.

There are ways to mitigate some of the responsiveness hits of synchronous wrappers by delaying the initial call into content until the content process is known ready to process it, but then operating synchronously: this allows the code to wait for the content event loop to "wake up". It is an intermediate solution between the message manager and direct access to browser.contentWindow, because it allows using a closure function:

DOM event propagation

Extensions which rely on DOM events propagating from content through chrome are very hard to fix with a compatibility layer: when extensions install a chrome event listener, we don't know whether they intend to listen for chrome or content events. And it is entirely impractical for performance reasons to forward every possible event (even filtering only those which have an event listener installed). We are actually planning on fixing (breaking) this propagation model well before content processes, but it is something to keep in mind.

Access through network channels or content policy

Extensions which implement the current content policy API, cannot possibly work correctly without changes. bz and bsmedberg are working on a redesigned content policy API, and believe we know the extensions which implement it.

Extensions which install HTTP listeners which also access content will need to be redesigned. There is no effective compatibility layer that we can think of. Fortunately this is fairly rare and those advanced extensions which do it (adblock) appear to be maintained.