Bug 1355680 - set progressMax to -1 when HTTP response head is not available. r=dragana,mayhemer

MozReview-Commit-ID: 6xJsYFlCptC

--HG--
extra : rebase_source : eb11c29314190d29b0b8cdcdeb6841b1cd13a168
This commit is contained in:
Shih-Chiang Chien 2017-04-12 14:31:57 +08:00
Родитель c62a09b53e
Коммит 98623ff680
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -756,7 +756,11 @@ HttpChannelChild::OnTransportAndData(const nsresult& channelStatus,
// necko msg in between them.
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
const int64_t progressMax = mResponseHead->ContentLength();
int64_t progressMax;
if (NS_FAILED(GetContentLength(&progressMax))) {
progressMax = -1;
}
const int64_t progress = offset + count;
// OnTransportAndData will be run on retargeted thread if applicable, however