Bug 1698842 - [devtools] Avoid notifying about already destroyed targets from TargetCommand. r=nchevobbe

This helps browser_toolbox_backward_forward_navigation.js passing with fission enabled.

Differential Revision: https://phabricator.services.mozilla.com/D108648
This commit is contained in:
Alexandre Poirot 2021-03-17 23:46:39 +00:00
Родитель 11f0c12d40
Коммит ddb7719619
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -176,6 +176,10 @@ class TargetCommand extends EventEmitter {
targetFrontsSet.delete(targetFront);
}
if (this.isDestroyed() || targetFront.isDestroyedOrBeingDestroyed()) {
return;
}
// Then, once the target is attached, notify the target front creation listeners
await this._createListeners.emitAsync(targetType, {
targetFront,