From 73d5d1ddc99001899b1aa84a4b062eb991996fd8 Mon Sep 17 00:00:00 2001 From: dylan Date: Thu, 11 May 2023 07:25:38 +0000 Subject: [PATCH] Bug 998736 removed NS_ENSURE_SUCCESS to avoid spamming mochitests. r=necko-reviewers,valentin Differential Revision: https://phabricator.services.mozilla.com/D177662 --- netwerk/base/nsFileStreams.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netwerk/base/nsFileStreams.cpp b/netwerk/base/nsFileStreams.cpp index 2702ab61703c..32281f6d02e0 100644 --- a/netwerk/base/nsFileStreams.cpp +++ b/netwerk/base/nsFileStreams.cpp @@ -506,7 +506,9 @@ nsFileInputStream::Read(char* aBuf, uint32_t aCount, uint32_t* _retval) { return rv; } - NS_ENSURE_SUCCESS(rv, rv); + if (NS_FAILED(rv)) { + return rv; + } // Check if we're at the end of file and need to close if (mBehaviorFlags & CLOSE_ON_EOF && *_retval == 0) {