This method asynchronously sends a message to the Jetpack process.
void sendMessage( in AString aMessageName, [optional] in jsval v1, Optional [optional] in jsval v2, Optional ... );
- The name of the message to send.
v1, v2, ...Optional
This registers a callback to be triggered whenever the Jetpack process sends a particular message.
void registerReceiver( in AString aMessageName, in jsval aReceiver );
- The name of the message from the Jetpack process on which the callback is triggered.
callMessage(), then the return value of this function is passed back to the Jetpack process.
This unregisters a callback previously registered with
void unregisterReceiver( in AString aMessageName, in jsval aReceiver );
- The name of the message on which the callback should no longer be triggered.
This unregisters all callbacks previously registered with
registerReceiver() for a particular message.
void unregisterReceivers( in AString aMessageName );
- The name of the message to unregister all callbacks from.
When evaluated, the script's global scope will include all privileged APIs.
Individual lines of the form
//@line 1 "foo.js" can be used to specify filename and line number information for debugging purposes.
void evalScript( in AString aScript );
- The full contents of the script to evaluate in the Jetpack process.
This creates an opaque handle that can transparently be exchanged between processes.
The new handle.
This terminates the Jetpack process.
If an exception goes uncaught in the Jetpack process, it will be reported to the chrome process via a message with the name
core:exception. The message comes with one argument, which represents the exception object that was thrown.
Warning: bug 589308 prevents this message from being sent in some situations.
See bug 556846 for details.