Bug 1753002 - Change the diagnostic assert to a debug assert until bug 1757910 is fixed. r=necko-reviewers,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D140182
This commit is contained in:
Dragana Damjanovic 2022-03-03 13:48:27 +00:00
Родитель 9d6e072a2c
Коммит d2b7eea8fb
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -115,7 +115,7 @@ nsresult Http3Stream::TryActivating() {
head->Method(method);
head->Path(path);
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
#ifdef DEBUG
nsAutoCString contentLength;
if (NS_SUCCEEDED(head->GetHeader(nsHttp::Content_Length, contentLength))) {
int64_t len;
@ -204,7 +204,7 @@ nsresult Http3Stream::OnReadSegment(const char* buf, uint32_t count,
break;
}
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
#ifdef DEBUG
mRequestBodyLenSent += *countRead;
#endif
mTotalSent += *countRead;
@ -214,7 +214,7 @@ nsresult Http3Stream::OnReadSegment(const char* buf, uint32_t count,
case EARLY_RESPONSE:
// We do not need to send the rest of the request, so just ignore it.
*countRead = count;
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
#ifdef DEBUG
mRequestBodyLenSent += count;
#endif
break;
@ -404,8 +404,8 @@ nsresult Http3Stream::ReadSegments(nsAHttpSegmentReader* reader) {
Telemetry::HTTP3_SENDING_BLOCKED_BY_FLOW_CONTROL_PER_TRANS,
mSendingBlockedByFlowControlCount);
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
MOZ_DIAGNOSTIC_ASSERT(mRequestBodyLenSent == mRequestBodyLenExpected);
#ifdef DEBUG
MOZ_ASSERT(mRequestBodyLenSent == mRequestBodyLenExpected);
#endif
rv = NS_OK;
again = false;

Просмотреть файл

@ -161,7 +161,7 @@ class Http3Stream final : public nsAHttpSegmentReader,
nsresult mSocketInCondition = NS_ERROR_NOT_INITIALIZED;
nsresult mSocketOutCondition = NS_ERROR_NOT_INITIALIZED;
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
#ifdef DEBUG
uint32_t mRequestBodyLenExpected{0};
uint32_t mRequestBodyLenSent{0};
#endif