From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- dom/quota/test/gtest/TestEncryptedStream.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'dom/quota/test/gtest/TestEncryptedStream.cpp') diff --git a/dom/quota/test/gtest/TestEncryptedStream.cpp b/dom/quota/test/gtest/TestEncryptedStream.cpp index 8937b0c4e7..04fe43f38e 100644 --- a/dom/quota/test/gtest/TestEncryptedStream.cpp +++ b/dom/quota/test/gtest/TestEncryptedStream.cpp @@ -127,20 +127,20 @@ ArrayBufferInputStream::Read(char* aBuf, uint32_t aCount, NS_IMETHODIMP ArrayBufferInputStream::ReadSegments(nsWriteSegmentFun writer, void* closure, uint32_t aCount, uint32_t* result) { - MOZ_ASSERT(result, "null ptr"); - MOZ_ASSERT(mBufferLength >= mPos, "bad stream state"); + MOZ_RELEASE_ASSERT(result, "null ptr"); + MOZ_RELEASE_ASSERT(mBufferLength >= mPos, "bad stream state"); if (mClosed) { return NS_BASE_STREAM_CLOSED; } - MOZ_ASSERT(mArrayBuffer || (mPos == mBufferLength), - "stream inited incorrectly"); + MOZ_RELEASE_ASSERT(mArrayBuffer || (mPos == mBufferLength), + "stream inited incorrectly"); *result = 0; while (mPos < mBufferLength) { uint32_t remaining = mBufferLength - mPos; - MOZ_ASSERT(mArrayBuffer); + MOZ_RELEASE_ASSERT(mArrayBuffer); uint32_t count = std::min(aCount, remaining); if (count == 0) { @@ -155,8 +155,9 @@ ArrayBufferInputStream::ReadSegments(nsWriteSegmentFun writer, void* closure, return NS_OK; } - MOZ_ASSERT(written <= count, - "writer should not write more than we asked it to write"); + MOZ_RELEASE_ASSERT( + written <= count, + "writer should not write more than we asked it to write"); mPos += written; *result += written; aCount -= written; @@ -174,7 +175,7 @@ ArrayBufferInputStream::IsNonBlocking(bool* aNonBlocking) { } NS_IMETHODIMP ArrayBufferInputStream::Tell(int64_t* const aRetval) { - MOZ_ASSERT(aRetval); + MOZ_RELEASE_ASSERT(aRetval); *aRetval = mPos; -- cgit v1.2.3