I have an app in a tab in my addon.
On load I do this:
var gCFMM = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDocShell)
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIContentFrameMessageManager);
and then
gCFMM.addMessageListener(core.addon.id, bootstrapMsgListener);
throughout the page I use gCFMM.sendAsyncMessage
But eventually the page the sendAsyncMessage starts throwing an error:
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMessageSender.sendAsyncMessage]
I can fix this sendAsyncMessage by getting the gCFMM
from window.QI
. However because I did addMessageListener
to the gCFMM
on load, that listener is now not responding.
I have no idea how this can happen. I am on Firefox 45 beta, and was selected for the e10s a/b test.