зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1669681 - [devtools] Send tabDetached event before the forwardingCancelled event in content-process-connector r=ochameau
Depends on D93029 Emitting "forwardingCancelled" will result in purging requests on the target front, which almost equates to destroying the front. We should emit the "tabDetached" event before that to avoid emitting events on already destroyed fronts. Differential Revision: https://phabricator.services.mozilla.com/D93030
This commit is contained in:
Родитель
a9480f8030
Коммит
e1074b5ab6
|
@ -287,6 +287,12 @@ class Front extends Pool {
|
|||
* Handler for incoming packets from the client's actor.
|
||||
*/
|
||||
onPacket(packet) {
|
||||
if (this.isDestroyed()) {
|
||||
// If the Front was already destroyed, all the requests have been purged
|
||||
// and rejected with detailed error messages in purgeRequestsForDestroy.
|
||||
return;
|
||||
}
|
||||
|
||||
// Pick off event packets
|
||||
const type = packet.type || undefined;
|
||||
if (this._clientSpec.events && this._clientSpec.events.has(type)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче