From 230e9f6e8f5ec2876b18299afe55cfdbd38fbcd2 Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Fri, 21 Dec 2018 13:02:32 -0800 Subject: [PATCH] Bug 1515833 - Remove verbose nsIURIMutator warnings. r=ehsan, valentin --HG-- extra : rebase_source : de2fecb9ddc4976085299d5abd75994c59ecc224 extra : histedit_source : 4a11cf470c2f59ada7ce7ecca4a7b9ebfbe004b4 --- netwerk/base/nsIURIMutator.idl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netwerk/base/nsIURIMutator.idl b/netwerk/base/nsIURIMutator.idl index 0068fbe47ac2..cf6f6d6b583f 100644 --- a/netwerk/base/nsIURIMutator.idl +++ b/netwerk/base/nsIURIMutator.idl @@ -334,7 +334,7 @@ NS_MutatorMethod(Method aMethod, Args ...aArgs) nsCOMPtr target = do_QueryInterface(aMutator, &rv); NS_ENSURE_SUCCESS(rv, rv); rv = (target->*aMethod)(aArgs...); - NS_ENSURE_SUCCESS(rv, rv); + if (NS_FAILED(rv)) return rv; return NS_OK; }; } @@ -493,7 +493,6 @@ public: return *this; } mStatus = aFunction(mMutator); - NS_ENSURE_SUCCESS(mStatus, *this); return *this; } @@ -543,7 +542,7 @@ public: MOZ_MUST_USE nsresult Finalize(nsIURI** aURI) { - NS_ENSURE_SUCCESS(mStatus, mStatus); + if (NS_FAILED(mStatus)) return mStatus; mStatus = mMutator->Finalize(aURI); NS_ENSURE_SUCCESS(mStatus, mStatus);