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)

defect

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
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
Irakli, Erik - are there recent changes in the loader that would cause this? Does my fix make sense?
Flags: needinfo?(rFobic)
Flags: needinfo?(evold)
(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.
Blocks: 1114752
Flags: needinfo?(evold)
Priority: -- → P1
In my tests my fix didn't break cfx. YMMV.
Assignee: nobody → evold
OS: Mac OS X → All
Hardware: x86 → All
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
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
removing the ni for Irakli.
Flags: needinfo?(rFobic)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: