Closed Bug 574039 Opened 10 years ago Closed 10 years ago

Change OOP-jetpack loading structure

Categories

(Add-on SDK Graveyard :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 568698

People

(Reporter: benjamin, Unassigned)

References

Details

When we designed the OOP-jetpack loading structure, we had a single implementation global and a user-script global. Because of the way jetpack uses CommonJS modules, they want something different:

Start out with a single global, which will run cuddlefish bootstrap code. That global will have a method to create other globals and evaluate scripts in them. I think we want two globals for this:

/**
 * Create a new global object into which script can be evaluated. Optionally
 * add the core message-passing functions to this global (we would do this for
 * jetpack implementation globals, but not for the addon global).
 */
createGlobal(aAllowMessagePassing);
evalIntoGlobal(global, script);

We may want to be able to "label" a global for debugging purposes: cc'ing atul for thoughts.

The only thing you do to bootstrap a jetpack is pass in a script to load in the initial global object. All other scripts to be evaluated will be passed around via messages.
Whoops, I already filed this.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 568698
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
You need to log in before you can comment on or make changes to this bug.