TL;DR: Shortly, I’ll be flipping a pref to outlaw unsafe CPOWs in almost
all browser code. Unsafe CPOWs inside add-on scopes should continue to work
properly. If you start seeing "unsafe CPOW usage forbidden” errors being
throw for a feature you’re working on in the Browser Console, it’s because
unsafe CPOWs have been outlawed and you should stop using them. Talk to me
if you run into problems.
“unsafe” CPOWs are CPOWs that are accessed when the other process is
not currently blocked waiting for information from you. For example, if you
access gBrowser.selectedBrowser.contentDocumentAsCPOW.body when the content
process is garbage collecting, the parent will be blocked until the child
decides that it has a moment to service the synchronous message and return
the information that the parent needs. Unsafe CPOWS are generally pretty
horrible for performance, especially because we cannot know what state the
other process is in.
“safe” CPOWs are when the other process is in a known blocked state - for
example, the content process sends a synchronous message to the parent
asking for some information, and is blocked waiting for a response. The
parent then accesses CPOWs in the content process safely, because the
content process is in a known state. The only overhead here is the IPC
“unsafe” CPOWs are often used by add-ons to synchronously manipulate
content. A year or so back, a bunch of browser code also used unsafe CPOWs
in this way, but we’ve been slowly but surely weeding them out. We’re at
the state now where we believe we’ve eliminated most of the in-browser
unsafe CPOW uses.
Within the next day or so, I’m going to be landing bug 1233497 which
will cause unsafe CPOW usage in non-addon browser code to throw. In the
event that this breaks things horribly, there is a pref that we can flip
to turn unsafe CPOWs back on while we fix things.
Again, this work is occurring in bug 1233497. If there are any major
concerns, please bring them up here before I throw the spaghetti into the
For more details on unsafe CPOWs, please read  and/or .
: Outside of tests, and a few other little things that there are