Bug 1419336 - Properly update HTTPi UI if a request is opened before finish; r=nchevobbe

MozReview-Commit-ID: GwkGlD1UB9G

--HG--
extra : rebase_source : 93e5b6f272be84e2e60379a6565280dc2054dc06
This commit is contained in:
Jan Odvarko 2017-12-07 12:08:48 +01:00
Родитель bb33981f16
Коммит 2f826319c3
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -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,
});
});
}
}