зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1644913 - Avoid exceptions if the storage actor is destroyed while processing a new window r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D79276
This commit is contained in:
Родитель
532a47e62b
Коммит
be0cd9625f
|
@ -276,6 +276,11 @@ StorageActors.defaults = function(typeName, observationTopics) {
|
|||
const host = this.getHostName(window.location);
|
||||
if (host && !this.hostVsStores.has(host)) {
|
||||
await this.populateStoresForHost(host, window);
|
||||
if (!this.storageActor) {
|
||||
// The actor might be destroyed during populateStoresForHost.
|
||||
return;
|
||||
}
|
||||
|
||||
const data = {};
|
||||
data[host] = this.getNamesForHost(host);
|
||||
this.storageActor.update("added", typeName, data);
|
||||
|
|
Загрузка…
Ссылка в новой задаче