diff options
author | Moonchild <moonchild@palemoon.org> | 2020-10-24 10:42:23 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-10-24 10:42:23 +0000 |
commit | e1db27e19989db11fef70f439cf95821316535b3 (patch) | |
tree | abac2c9f5115323a8816d3ef600d8cb2bca5a33e /netwerk/base/nsStreamLoader.cpp | |
parent | a98d06380fe706e3b1b602411c597b9882516b3e (diff) | |
parent | a5203631d8cded437c05243cde17cddeba13e3ec (diff) | |
download | UXP-e1db27e19989db11fef70f439cf95821316535b3.tar UXP-e1db27e19989db11fef70f439cf95821316535b3.tar.gz UXP-e1db27e19989db11fef70f439cf95821316535b3.tar.lz UXP-e1db27e19989db11fef70f439cf95821316535b3.tar.xz UXP-e1db27e19989db11fef70f439cf95821316535b3.zip |
Merge branch 'redwood' into releaseRELBASE_20201024RC_20201024
Diffstat (limited to 'netwerk/base/nsStreamLoader.cpp')
-rw-r--r-- | netwerk/base/nsStreamLoader.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/netwerk/base/nsStreamLoader.cpp b/netwerk/base/nsStreamLoader.cpp index a73b038a7..9990d1882 100644 --- a/netwerk/base/nsStreamLoader.cpp +++ b/netwerk/base/nsStreamLoader.cpp @@ -54,7 +54,7 @@ NS_IMPL_ISUPPORTS(nsStreamLoader, nsIStreamLoader, NS_IMETHODIMP nsStreamLoader::GetNumBytesRead(uint32_t* aNumBytes) { - *aNumBytes = mData.length(); + *aNumBytes = mBytesRead; return NS_OK; } @@ -150,7 +150,10 @@ nsStreamLoader::OnDataAvailable(nsIRequest* request, nsISupports *ctxt, uint64_t sourceOffset, uint32_t count) { uint32_t countRead; - return inStr->ReadSegments(WriteSegmentFun, this, count, &countRead); + nsresult rv = inStr->ReadSegments(WriteSegmentFun, this, count, &countRead); + NS_ENSURE_SUCCESS(rv, rv); + mBytesRead += countRead; + return NS_OK; } void |