Bug 1308341 - Don't fire the progress event if the length is 0, r=baku

This commit is contained in:
Shawn Huang 2016-11-08 17:45:36 +08:00
parent ecb80a7ac8
commit 71456ae11e

View File

@ -3537,6 +3537,11 @@ XMLHttpRequestMainThread::Notify(nsITimer* aTimer)
void
XMLHttpRequestMainThread::HandleProgressTimerCallback()
{
// Don't fire the progress event if mLoadTotal is 0, see XHR spec step 6.1
if (!mLoadTotal && mLoadTransferred) {
return;
}
mProgressTimerIsActive = false;
if (!mProgressSinceLastProgressEvent || mErrorLoad) {