Closed
Bug 1115601
Opened 11 years ago
Closed 11 years ago
Wrong resource uri generated when running on sdk master with -o
Categories
(Add-on SDK Graveyard :: General, defect, P1)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: canuckistani, Assigned: evold)
References
Details
Attachments
(1 file)
Sample code:
console.log(">>", require('sdk/self').data.url('something'));
If I run using jpm -b nightly run:
resource://data-uri-bug/data/something
If I run using jpm -o ~/code/jetpack/addon-sdk/ though, I get:
resource://data-uri-bug/data-uri-bug/data/something
..this breaks icons in buttons, etc. Not completely sure why it's happening, only happens against current master.
resource://data-uri-bug/data-uri-bug/data/something
Reporter | ||
Comment 1•11 years ago
|
||
More on this, the guilty party seems to be:
https://github.com/mozilla/addon-sdk/commit/dddcc2ac118b78c2aa560799b78264587033cecc#diff-4f5345f90b44fd35f6563db4ff549253R24
options.prefixURI always seems to be
It doesn't make any sense for use to add options.name to the end of prefixURI? I can fix this by changing
https://github.com/mozilla/addon-sdk/blob/master/lib/sdk/self.js#L24
from
const baseURI = ("prefixURI" in options) ? (options.prefixURI + (name ? (name + "/") : "")) : readPref("baseURI");
to
const baseURI = ("prefixURI" in options) ? options.prefixURI : readPref("baseURI");
I've opened this PR:
https://github.com/mozilla/addon-sdk/pull/1772
Reporter | ||
Comment 2•11 years ago
|
||
Irakli, Erik - are there recent changes in the loader that would cause this? Does my fix make sense?
Flags: needinfo?(rFobic)
Flags: needinfo?(evold)
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Jeff Griffiths (:canuckistani) from comment #2)
> Irakli, Erik - are there recent changes in the loader that would cause this?
> Does my fix make sense?
I think this make break under cfx, also it is failing on travis.
I'm not sure what the right thing to do here is yet, we should take a closer look at this before uplift I think though.
Reporter | ||
Comment 4•11 years ago
|
||
In my tests my fix didn't break cfx. YMMV.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → evold
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8544840 -
Flags: review+
Comment 6•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/62e206d79a2de3b00dc9fa8bc6625ca2f0df719e
Bug 1115601 - Wrong resource uri generated when running on sdk master with -o
reverting this line change https://github.com/mozilla/addon-sdk/commit/dddcc2ac118b78c2aa560799b78264587033cecc#diff-4f5345f90b44fd35f6563db4ff549253R24
https://github.com/mozilla/addon-sdk/commit/aeac541419406bf9b38f1dbaa6adbd4e94058aae
Merge pull request #1806 from erikvold/1115601
Bug 1115601 - Wrong resource uri generated when running on sdk master with -o a=me
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•