Closed
Bug 1130529
Opened 10 years ago
Closed 10 years ago
Add a way to load modules in child processes and wrappers around the message managers
Categories
(Add-on SDK Graveyard :: General, defect, P1)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mossop, Assigned: mossop)
References
Details
We now have a few pieces of SDK code loaded in the child processes and that is only going to grow. The current framescript mechanism is a little clunky so I'm working on a replacement which will simply allow any add-on to load any module in the child process.
Irakli's framescript/manager is a good start here but it has a few flaws:
- Every add-on shares the same loader in the child process
- Doesn't handle add-on unload correctly
- Doesn't include nice mechanisms for messaging
The API I have implemented uses zombie's work for creating add-on specific module loaders in the child processes but makes everything nicer:
sdk/remote/parent:
Used by the main add-on code. Provides message passing with:
processes:
A list of child process. Fires events when processes are created/destroyed. Includes message ports for communicating through the process message manager.
frames:
A list of child frames. Fires events when frames are created/destroyed. Includes message ports for communicating through the frame message managers.
remoteRequire:
Loads a module in every child process. Each process gets its own loader per add-on. Once required once the module will load in every new child process that starts.
sdk/remote/child:
Used by modules in the child process for message passing:
parent (needs a better name):
A message port that communicates through the process message manager (pipes to processes in parent).
frames:
A list of frames in this process. Fires events when frames are created/destroyed. Includes message ports for communicating through the frame message managers (pipes to frames in parent).
Updated•10 years ago
|
Status: NEW → ASSIGNED
Comment 1•10 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/abdeb4048f95bbda2ca07448cbf210da16d0e8a7
Bug 1130529: Add a way to load modules in child processes and wrappers around the message managers. r=erikvold
https://github.com/mozilla/addon-sdk/commit/fd681b5b84959eddd1df8670606df86e846b9668
Bug 1130529: Switch the tabs, worker and context-menu APIs to use the new remote APIs. r=erikvold
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•