Bug 1404138 - Properly dispatch actions; r=nchevobbe
MozReview-Commit-ID: 2jMTXUzAvAh
--- a/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js
+++ b/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js
@@ -261,34 +261,35 @@ NewConsoleOutputWrapper.prototype = {
this.throttledDispatchTimeout = setTimeout(() => {
this.throttledDispatchTimeout = null;
store.dispatch(actions.messagesAdd(this.queuedMessageAdds));
this.queuedMessageAdds = [];
if (this.queuedMessageUpdates.length > 0) {
this.queuedMessageUpdates.forEach(({ message, res }) => {
- actions.networkMessageUpdate(message);
+ store.dispatch(actions.networkMessageUpdate(message));
this.jsterm.hud.emit("network-message-updated", res);
});
this.queuedMessageUpdates = [];
}
if (this.queuedRequestUpdates.length > 0) {
this.queuedRequestUpdates.forEach(({ id, data}) => {
- actions.networkUpdateRequest(id, data);
- // Fire an event indicating that all data fetched from
- // the backend has been received. This is based on
- // 'FirefoxDataProvider.isQueuePayloadReady', see more
- // comments in that method.
- // (netmonitor/src/connector/firefox-data-provider).
- // This event might be utilized in tests to find the right
- // time when to finish.
- this.jsterm.hud.emit("network-request-payload-ready", {id, data});
+ store.dispatch(actions.networkUpdateRequest(id, data));
});
this.queuedRequestUpdates = [];
+
+ // Fire an event indicating that all data fetched from
+ // the backend has been received. This is based on
+ // 'FirefoxDataProvider.isQueuePayloadReady', see more
+ // comments in that method.
+ // (netmonitor/src/connector/firefox-data-provider).
+ // This event might be utilized in tests to find the right
+ // time when to finish.
+ this.jsterm.hud.emit("network-request-payload-ready");
}
}, 50);
},
// Should be used for test purpose only.
getStore: function () {
return store;
}