From 2f826319c386d68ccdc1266ed240c91d87964be4 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 7 Dec 2017 12:08:48 +0100 Subject: [PATCH] Bug 1419336 - Properly update HTTPi UI if a request is opened before finish; r=nchevobbe MozReview-Commit-ID: GwkGlD1UB9G --HG-- extra : rebase_source : 93e5b6f272be84e2e60379a6565280dc2054dc06 --- .../client/webconsole/new-console-output/store.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/devtools/client/webconsole/new-console-output/store.js b/devtools/client/webconsole/new-console-output/store.js index 34025ddb4deb..6e682ff656fb 100644 --- a/devtools/client/webconsole/new-console-output/store.js +++ b/devtools/client/webconsole/new-console-output/store.js @@ -227,12 +227,23 @@ function enableNetProvider(hud) { } } - // Process all incoming HTTP details packets. + // Process all incoming HTTP details packets. Note that + // Network event update packets are sent in batches from: + // `NewConsoleOutputWrapper.dispatchMessageUpdate` using + // NETWORK_MESSAGE_UPDATE action. + // Make sure to call `dataProvider.onNetworkEventUpdate` + // to fetch data from the backend. if (type == NETWORK_MESSAGE_UPDATE) { let actor = action.response.networkInfo.actor; let open = getAllMessagesUiById(state).includes(actor); if (open) { - dataProvider.onNetworkEventUpdate(null, action.response); + let message = getMessage(state, actor); + message.updates.forEach(updateType => { + dataProvider.onNetworkEventUpdate(null, { + packet: { updateType }, + networkInfo: message, + }); + }); } }