Ship the bootstrap.js file with Firefox

RESOLVED FIXED in mozilla32

Status

defect
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: evold, Assigned: evold)

Tracking

unspecified
mozilla32
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

No description provided.
Hey,

Do either of you two have some ideas about how best to do this?

At the moment my patch in bug 915376 just has a copy of the bootstrap.js from the add-on sdk repo, but I doubt that we want to land that way.  We should be able to make updates to the bootstrap.js file from the addon-sdk repo instead of having to do them in m-c
Flags: needinfo?(rFobic)
Flags: needinfo?(dtownsend+bugmail)
All of our modules are copied into the build to be under resource://gre/modules/commonjs... If we copied the bootstrap somewhere similar then the add-on manager can load it from there like it does for the dictionary bootstrap script.
Flags: needinfo?(dtownsend+bugmail)
Assignee: nobody → evold
(In reply to Dave Townsend [:mossop] from comment #2)
> All of our modules are copied into the build to be under
> resource://gre/modules/commonjs... If we copied the bootstrap somewhere
> similar then the add-on manager can load it from there like it does for the
> dictionary bootstrap script.

ok I see how this is done, with the copy_source.py file, should the file be located in `resource://gre/modules/commonjs/` or someplace else?  like `resource://gre/modules/bootstraps/` ?
Flags: needinfo?(dtownsend+bugmail)
We have precedence for putting bootstraps into resource://gre/modules, just do it like this and give it an appropriate name (SDKBootstrap.js?): http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/internal/moz.build#16
Flags: needinfo?(dtownsend+bugmail)
Priority: -- → P1
(In reply to Dave Townsend [:mossop] from comment #4)
> We have precedence for putting bootstraps into resource://gre/modules, just
> do it like this and give it an appropriate name (SDKBootstrap.js?):
> http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/
> internal/moz.build#16

k that sounds good to me.
So it seems difficult to have the file copied & renamed, and renaming the file in the sdk would break a cfx use case where one copies the `app-extension` folder, makes changes, and uses `cfx --template-dir`.  So my patch is moving the bootstrap.js file to resource://gre/modules/sdk/bootstrap.js

In the future we could use this directory for JSMs.
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #7)
> So it seems difficult to have the file copied & renamed, and renaming the
> file in the sdk would break a cfx use case where one copies the
> `app-extension` folder, makes changes, and uses `cfx --template-dir`.  So my
> patch is moving the bootstrap.js file to
> resource://gre/modules/sdk/bootstrap.js

oh for the record I know we'll break this at some point anyhow, but I'd prefer to wait until jpm is shipped.
Attachment #8424175 - Flags: review?(dtownsend+bugmail) → review+

Comment 10

5 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/b744c9e6a26c9c5ea3c43a1969bacdee0e8089a6
Bug 1009334 - Ship the Add-on SDK bootstrap.js file with Firefox r=Mossop
https://hg.mozilla.org/mozilla-central/rev/9c32f0d1967d
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Flags: needinfo?(rFobic)
You need to log in before you can comment on or make changes to this bug.