iBug 1122788 - patch 2 - nsMultiplexInputStream should not use Tell() in debug builds, r=bz

This commit is contained in:
Andrea Marchesini 2015-12-05 09:36:51 +00:00
parent c018e81125
commit ebc5b1a50f
3 changed files with 7 additions and 8 deletions

View File

@ -382,7 +382,7 @@ function onFilesOpened(message) {
testHasRun();
};
r.onload = function (event) {
todo(false, "nonexistent file shouldn't load! (FIXME: bug 1122788)");
is(false, "nonexistent file shouldn't load! (FIXME: bug 1122788)");
testHasRun();
};
try {

View File

@ -1165,9 +1165,9 @@ RemoteInputStream::ReallyBlockAndWaitForStream()
#ifdef DEBUG
if (waited && mWeakSeekableStream) {
int64_t position;
MOZ_ASSERT(NS_SUCCEEDED(mWeakSeekableStream->Tell(&position)),
"Failed to determine initial stream position!");
MOZ_ASSERT(!position, "Stream not starting at 0!");
if (NS_SUCCEEDED(mWeakSeekableStream->Tell(&position))) {
MOZ_ASSERT(!position, "Stream not starting at 0!");
}
}
#endif
}

View File

@ -214,15 +214,14 @@ nsMultiplexInputStream::Available(uint64_t* aResult)
return mStatus;
}
nsresult rv;
uint64_t avail = 0;
uint32_t len = mStreams.Length();
for (uint32_t i = mCurrentStream; i < len; i++) {
uint64_t streamAvail;
rv = AvailableMaybeSeek(mStreams[i], &streamAvail);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
mStatus = AvailableMaybeSeek(mStreams[i], &streamAvail);
if (NS_WARN_IF(NS_FAILED(mStatus))) {
return mStatus;
}
avail += streamAvail;
}