Labs/Jetpack/JEP/25: Difference between revisions
Jump to navigation
Jump to search
m (rewording) |
(added notes on memory tracking) |
||
| Line 6: | Line 6: | ||
* They are a superset of the [[ServerJS/Modules/SecurableModules|SecurableModule]] standard. | * They are a superset of the [[ServerJS/Modules/SecurableModules|SecurableModule]] standard. | ||
* They can be loaded and unloaded multiple times throughout the lifetime of their containing application. | * They can be loaded and unloaded multiple times throughout the lifetime of their containing application (yes, leaks are an unfortunate possibility). | ||
* They have access to an <tt>onUnload()</tt> function that allows them to register callbacks to perform cleanup tasks when unloaded. | * They have access to an <tt>onUnload()</tt> function that allows them to register callbacks to perform cleanup tasks when unloaded. | ||
* They have full access to XPConnect's <tt>Components</tt> object, and all its sub-objects. | * They have full access to XPConnect's <tt>Components</tt> object, and all its sub-objects. | ||
| Line 19: | Line 19: | ||
* A simple, straightforward mechanism for writing and executing test cases. | * A simple, straightforward mechanism for writing and executing test cases. | ||
* An easy-to-learn documentation system capable of producing beautiful documentation. | * An easy-to-learn documentation system capable of producing beautiful documentation. | ||
* A mechanism for tracking objects of interest belonging to the Chrome Booster to aid in memory profiling and leak detection. | |||
Revision as of 17:36, 3 September 2009
Chrome Boosters are third-party modules that can be used to provide functionality to Jetpack Features or Firefox Add-ons. As their name implies, they are chrome-privileged and use dependency injection to offer functionality to non-chrome-privileged Jetpacks.
These modules essentially formalize the mechanism used within Jetpack to provide the jetpack namespace to Jetpacks.
Chrome Boosters have the following characteristics:
- They are a superset of the SecurableModule standard.
- They can be loaded and unloaded multiple times throughout the lifetime of their containing application (yes, leaks are an unfortunate possibility).
- They have access to an onUnload() function that allows them to register callbacks to perform cleanup tasks when unloaded.
- They have full access to XPConnect's Components object, and all its sub-objects.
For security purposes, Chrome Boosters can only be accessed either
- locally, through a containing addon, or
- over secure HTTP to a trusted host.
Additionally, to encourage good coding practices and documentation, Chrome Boosters must have:
- A simple, straightforward mechanism for writing and executing test cases.
- An easy-to-learn documentation system capable of producing beautiful documentation.
- A mechanism for tracking objects of interest belonging to the Chrome Booster to aid in memory profiling and leak detection.