mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1044584 - Fix incorrect computation of mUploadTransferred. r=bz
This commit is contained in:
parent
21a6473c1b
commit
ea0878e381
@ -3592,11 +3592,13 @@ nsXMLHttpRequest::OnProgress(nsIRequest *aRequest, nsISupports *aContext, uint64
|
||||
// So, try to remove the headers, if possible.
|
||||
bool lengthComputable = (aProgressMax != UINT64_MAX);
|
||||
if (upload) {
|
||||
mUploadTransferred = aProgress;
|
||||
uint64_t loaded = aProgress;
|
||||
if (lengthComputable) {
|
||||
mUploadTransferred = aProgressMax - mUploadTotal;
|
||||
uint64_t headerSize = aProgressMax - mUploadTotal;
|
||||
loaded -= headerSize;
|
||||
}
|
||||
mUploadLengthComputable = lengthComputable;
|
||||
mUploadTransferred = loaded;
|
||||
mProgressSinceLastProgressEvent = true;
|
||||
|
||||
MaybeDispatchProgressEvents(false);
|
||||
|
Loading…
Reference in New Issue
Block a user