зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1672778 - [devtools] Avoid trying to send new-source event if the thread actor has been destroyed. r=nchevobbe
This may prevent logging a few exception or error messages. But thanks to the other patch of this bug, we should try to stop listening for sources as soon as the thread actor is destroyed. Differential Revision: https://phabricator.services.mozilla.com/D94484
This commit is contained in:
Родитель
2839b0697a
Коммит
ecca7cad66
|
@ -2042,6 +2042,9 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
|||
// We use executeSoon because we don't want to block those operations
|
||||
// by sending packets in the middle of them.
|
||||
DevToolsUtils.executeSoon(() => {
|
||||
if (this.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
this.emit("newSource", {
|
||||
source: source.form(),
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче