зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d30a516912
Коммит
00064d8224
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче