mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
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:
parent
8a87d1b582
commit
0eaaeb886a
@ -82,6 +82,10 @@ class LegacyWorkersWatcher {
|
||||
|
||||
// Fetch the list of already existing worker targets for this process target front.
|
||||
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
|
||||
// Force destroying the targets
|
||||
|
Loading…
Reference in New Issue
Block a user