Labs/Jetpack/Binary Components: Difference between revisions

added more sections
(Added API section)
(added more sections)
Line 12: Line 12:
This will give you the <code>nsJetpack</code> native JavaScript object, which provides access to all the component's functionality.
This will give you the <code>nsJetpack</code> native JavaScript object, which provides access to all the component's functionality.


== API ==
== Flexible Membrane Functionality ==


=== nsJetpack.wrap() ===
<code>nsJetpack</code> contains functionality that exposes many SpiderMonkey C API calls to JavaScript, allowing chrome code to create custom wrappers (aka membranes) that allow trusted and untrusted code to interoperate.


=== nsJetpack.unwrap() ===
The source code for this functionality is in [http://hg.mozilla.org/labs/jetpack/file/tip/components/src/wrapper.cpp wrapper.cpp]. 


=== nsJetpack.getWrapper() ===
=== wrap() ===


=== nsJetpack.profileMemory() ===
=== unwrap() ===


=== nsJetpack.functionInfo() ===
=== getWrapper() ===


=== nsJetpack.seal() ===
== Memory Profiling ==
 
<code>nsJetpack</code> contains functionality allowing chrome code to examine the JavaScript heap. The semantics of this are described at a high level in Atul's blog post entitled [http://www.toolness.com/wp/?p=604 Fun with SpiderMonkey].
 
The source code for this functionality is in [http://hg.mozilla.org/labs/jetpack/file/fc92de842a72/components/src/memory_profiler.cpp memory_profiler.cpp].
 
=== profileMemory() ===
 
== Miscellaneous Functions ==
 
The source code for this functionality is in [http://hg.mozilla.org/labs/jetpack/file/fc92de842a72/components/src/tcb.cpp tcb.cpp].
 
=== functionInfo() ===
 
=== seal() ===
93

edits