зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290599 - Part 2: Fix the browser_toolbox_transport_events.js test r=jryans
MozReview-Commit-ID: 3Ck8o29f93K --HG-- extra : rebase_source : 006a5e8f672aed299c0fb68b8a366940e88db5d6
This commit is contained in:
Родитель
e127cebee2
Коммит
16d3197662
|
@ -3,6 +3,8 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { on, off } = require("sdk/event/core");
|
||||
const { DebuggerClient } = require("devtools/shared/client/main");
|
||||
|
||||
|
@ -73,11 +75,11 @@ function onToolboxCreated(eventId, toolbox) {
|
|||
let transport = client._transport;
|
||||
|
||||
transport.on("send", send1);
|
||||
transport.on("onPacket", onPacket1);
|
||||
transport.on("packet", onPacket1);
|
||||
|
||||
client.addOneTimeListener("closed", event => {
|
||||
transport.off("send", send1);
|
||||
transport.off("onPacket", onPacket1);
|
||||
transport.off("packet", onPacket1);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -97,10 +99,10 @@ function onDebuggerClientConnect(client) {
|
|||
let transport = client._transport;
|
||||
|
||||
transport.on("send", send2);
|
||||
transport.on("onPacket", onPacket2);
|
||||
transport.on("packet", onPacket2);
|
||||
|
||||
client.addOneTimeListener("closed", event => {
|
||||
transport.off("send", send2);
|
||||
transport.off("onPacket", onPacket2);
|
||||
transport.off("packet", onPacket2);
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче