mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1484764 - Prevent netmonitors is undefined exception when closing tools during page load. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D3863 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
28c6b4ddec
commit
740bef2e99
@ -1495,6 +1495,11 @@ WebConsoleActor.prototype =
|
||||
return new Promise(resolve => {
|
||||
let messagesReceived = 0;
|
||||
const onMessage = ({ data }) => {
|
||||
// Resolve early if the console actor is destroyed
|
||||
if (!this.netmonitors) {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
if (data.url != url) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user