зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1621337 - Check if existingTargets is still defined when processing listWorkerChanged r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D74699
This commit is contained in:
Родитель
8a87d1b582
Коммит
0eaaeb886a
|
@ -82,6 +82,10 @@ class LegacyWorkersWatcher {
|
||||||
|
|
||||||
// Fetch the list of already existing worker targets for this process target front.
|
// Fetch the list of already existing worker targets for this process target front.
|
||||||
const existingTargets = this.targetsByProcess.get(targetFront);
|
const existingTargets = this.targetsByProcess.get(targetFront);
|
||||||
|
if (!existingTargets) {
|
||||||
|
// unlisten was called while processing the workerListChanged callback.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Process the new list to detect the ones being destroyed
|
// Process the new list to detect the ones being destroyed
|
||||||
// Force destroying the targets
|
// Force destroying the targets
|
||||||
|
|
Загрузка…
Ссылка в новой задаче