Bug 1307892 - Add support for network event update message r=nchevobbe

MozReview-Commit-ID: 4lat3RYa4YN
This commit is contained in:
Ricky Chien
2017-01-29 13:07:58 +08:00
parent d63edf2e6a
commit 6783233089
15 changed files with 343 additions and 191 deletions

View File

@@ -134,7 +134,7 @@ NewConsoleOutputWrapper.prototype = {
let jsterm = this.jsterm;
jsterm.hud.on("new-messages", function onThisMessage(e, messages) {
for (let m of messages) {
if (m.messageId == messageId) {
if (m.messageId === messageId) {
resolve(m.node);
jsterm.hud.off("new-messages", onThisMessage);
return;
@@ -160,6 +160,16 @@ NewConsoleOutputWrapper.prototype = {
store.dispatch(actions.timestampsToggle(enabled));
},
dispatchMessageUpdate: function (message, res) {
batchedMessageAdd(actions.networkMessageUpdate(message));
// network-message-updated will emit when eventTimings message arrives
// which is the last one of 8 updates happening on network message update.
if (res.packet.updateType === "eventTimings") {
this.jsterm.hud.emit("network-message-updated", res);
}
},
// Should be used for test purpose only.
getStore: function () {
return store;