XPCOM/Bootstrap: Difference between revisions

registration, updated
(done)
(registration, updated)
 
Line 35: Line 35:
I'd like to move component registration into the chrome.manifest files to be declarative lines:
I'd like to move component registration into the chrome.manifest files to be declarative lines:


  component <CID> <contractID> <file>
  component <CID> <file>
contract <contractid> <CID>
  category <category> <entry> <value>
  category <category> <entry> <value>


Potential pitfalls: currently components that fail to load (for instance because system libraries are not available) will not register at all. With declarative registration they will now be registered, but will fail to load.
For example, to register a single CID and contract:


Migration: I don't *want* to support the old registration method at all, but it may be necessary for extension compatibility for at least a major release cycle. Thoughts welcome.
component 550e8400-e29b-41d4-a716-446655440000 components/MyComponent.js
contract @foo.bar/my-component;1 550e8400-e29b-41d4-a716-446655440000


Note: this proposal doesn't currently touch XPT loading... xpt loading sucks, but can be dealt with separately.
Potential pitfalls: currently components that fail to load (for instance because system libraries are not available) will not register at all. With declarative registration they will now be registered, but will fail to load.
Confirmed users, Bureaucrats and Sysops emeriti
1,217

edits