Bug 1415081 - part 3 - WebSocketChannel cannot use ::Available() to know the size of a nsIAsyncInputStream, r=smaug

This commit is contained in:
Andrea Marchesini
2017-11-09 11:18:08 +01:00
parent 0a44dbef8b
commit c32e6762d0

View File

@@ -1047,13 +1047,6 @@ public:
{
MOZ_ASSERT(mMsgType == kMsgTypeStream, "Not a stream!");
#ifdef DEBUG
// Make sure we got correct length from Blob
uint64_t bytes;
mMsg.pStream->Available(&bytes);
NS_ASSERTION(bytes == mLength, "Stream length != blob length!");
#endif
nsAutoPtr<nsCString> temp(new nsCString());
nsresult rv = NS_ReadInputStreamToString(mMsg.pStream, *temp, mLength);