Bug 986639: Use the __URI__ property of component and module globals to detect which add-on they come from (missed review comments). r=fitzgen

This commit is contained in:
Dave Townsend 2014-03-27 09:02:39 -07:00
parent dd9105799a
commit 5dcb75658d
3 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ function testSources(expectSecondModule) {
gThreadClient.getSources(({sources}) => {
ok(sources.length, "retrieved sources");
sources.forEach(source => {
for (let source of sources) {
let url = source.url.split(" -> ").pop();
let { label, group } = gSources.getItemByValue(source.url).attachment;
@ -81,7 +81,7 @@ function testSources(expectSecondModule) {
} else {
ok(false, "Saw an unexpected source: " + url);
}
});
}
ok(foundAddonModule, "found JS module for the addon in the list");
is(foundAddonModule2, expectSecondModule, "saw the second addon module");

View File

@ -56,7 +56,7 @@ function testSources() {
gThreadClient.getSources(({sources}) => {
ok(sources.length, "retrieved sources");
sources.forEach(source => {
for (let source of sources) {
let url = source.url.split(" -> ").pop();
info(source.url + "\n\n\n" + url);
let { label, group } = gSources.getItemByValue(source.url).attachment;
@ -80,7 +80,7 @@ function testSources() {
} else {
ok(false, "Saw an unexpected source: " + url);
}
});
}
ok(foundAddonModule, "found code for the addon in the list");
ok(foundAddonBootstrap, "found bootstrap for the addon in the list");

View File

@ -4728,7 +4728,7 @@ update(AddonThreadActor.prototype, {
return id.value === this.addonID;
}
catch (e) {
console.log("Unexpected URI " + uridescriptor.value);
DevToolsUtils.reportException("AddonThreadActor.prototype._checkGlobal", e);
}
}