Installing built in addon breaks devtools addons tests
Categories
(WebExtensions :: General, defect, P1)
Tracking
(firefox67 fixed)
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: daleharvey, Assigned: aswan)
References
Details
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details |
Looking at the try run @ https://treeherder.mozilla.org/#/jobs?repo=try&revision=9705c1cae7e8b06d0cce47aa517273785c067302&selectedJob=229324147
There are a lot of devtools failures around listing / reading addons that dont seem like they could be caused by my code other than the fact that it installs builtin addons
Reporter | ||
Comment 1•6 years ago
|
||
This patch reproduces the bug for me, can see with
/mach test devtools/client/shared/test/browser_dbg_listaddons.js
Reporter | ||
Comment 2•6 years ago
|
||
Hey Andrew sorry I think theres another extensions bug here
Assignee | ||
Comment 3•6 years ago
|
||
I think something like this is the right approach. There are a bunch of tests, however, that make assumptions about the return value from getResourceURI(). I think updating those tests, rather than trying to put more special-case handling into getResourceURI() is probably ideal. Dale, let me know if you have time to go through the tests or if you'd like me to do it.
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
@@ -1025,20 +1025,21 @@ AddonWrapper = class {
*
* @param {string?} aPath
* The path in the add-on to get the URI for or null to get a URI to
* the file or directory the add-on is installed as.
* @returns {nsIURI}
*/
getResourceURI(aPath) {
let addon = addonFor(this);
- if (!aPath)
- return Services.io.newFileURI(addon._sourceBundle);
-
- return XPIInternal.getURIForResourceInFile(addon._sourceBundle, aPath);
+ let url = Services.io.newURI(addon.rootURI);
+ if (aPath) {
+ url = Services.io.newURI(aPath, null, url);
+ }
+ return url;
}
};
function chooseValue(aAddon, aObj, aProp) {
let repositoryAddon = aAddon._repositoryAddon;
let objValue = aObj[aProp];
if (repositoryAddon && aProp in repositoryAddon &&
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 4•6 years ago
|
||
Hey Andrew
I tried pushing this to try and started seeing a whole bunch of new failures: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4421817c7fe71d9e2b127f102df20b9881fdcb4c&selectedJob=229678903 (/test_filepointer.js devtools/server/tests/browser/browser_storage_dynamic_windows.js etc look suspicious)
I am not so familiar with this stuff and got a lot of fairly urgent work at the moment so if theres any change you have cycles asap it would be a huge help
Cheers
Dale
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Dale can you try the attached patch and let me know if it works for you?
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Reporter | ||
Comment 7•6 years ago
|
||
Doing a try run @ https://treeherder.mozilla.org/#/jobs?repo=try&revision=03aae059367a39d6df5a0d921c4d25e7e0c489b1, cheers
Reporter | ||
Comment 8•6 years ago
|
||
There is still a few extensions/debugging failures after this patch, but a lot less than without it (https://treeherder.mozilla.org/#/jobs?repo=try&revision=79c8764181d3bc615d2ed5bb43b99851bda09e00&selectedJob=230623630)
So be great to get this landed and can investigate the other failures seperately, thanks
Assignee | ||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
bugherder |
Comment 11•6 years ago
|
||
From my understanding this issue is related to the addon tests. Is there any need of manual QA here? If not can you please mark it as "qe-verify- "
Assignee | ||
Updated•6 years ago
|
Description
•