Bug 1434076 Correct calls to getAPI() on wrong api manager r=kmag

MozReview-Commit-ID: ADrV9x8gXhc

--HG--
extra : rebase_source : 1d147dc19b67c6777c29ad99d859e58919fd203b
This commit is contained in:
Andrew Swan 2018-02-22 12:20:34 -08:00
Родитель d30a516912
Коммит 00064d8224
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1002,7 +1002,7 @@ class SchemaAPIManager extends EventEmitter {
onStartup(extension) {
let promises = [];
for (let apiName of this.eventModules.get("startup")) {
promises.push(this.asyncGetAPI(apiName, extension).then(api => {
promises.push(extension.apiManager.asyncGetAPI(apiName, extension).then(api => {
if (api) {
api.onStartup();
}
@ -1110,7 +1110,7 @@ class SchemaAPIManager extends EventEmitter {
emitManifestEntry(extension, entry) {
let apiName = this.manifestKeys.get(entry);
if (apiName) {
let api = this.getAPI(apiName, extension);
let api = extension.apiManager.getAPI(apiName, extension);
return api.onManifestEntry(entry);
}
}
@ -1132,7 +1132,7 @@ class SchemaAPIManager extends EventEmitter {
async asyncEmitManifestEntry(extension, entry) {
let apiName = this.manifestKeys.get(entry);
if (apiName) {
let api = await this.asyncGetAPI(apiName, extension);
let api = await extension.apiManager.asyncGetAPI(apiName, extension);
return api.onManifestEntry(entry);
}
}