Bug 1310127 - Part 7: Use MOZ_MUST_USE in netwerk/protocol/http r=jst
authorWei-Cheng Pan <wpan@mozilla.com>
Tue, 20 Dec 2016 15:02:46 +0800
changeset 346161 e7ee73a65e05441119b0e1dafa3815d27bd3172f
parent 346160 77322ec672080042e7f88411d1aeed829444972d
child 346162 d574affa110cc7b87858f2f00f4345b37fe9ba1c
push id31459
push usercbook@mozilla.com
push dateTue, 07 Mar 2017 14:05:14 +0000
treeherdermozilla-central@1fb56ba248d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs1310127
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1310127 - Part 7: Use MOZ_MUST_USE in netwerk/protocol/http r=jst MozReview-Commit-ID: NpX8rph1Ke
dom/webbrowserpersist/nsWebBrowserPersist.cpp
--- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -1381,28 +1381,31 @@ nsresult nsWebBrowserPersist::SaveURIInt
             encodedChannel->SetApplyConversion(false);
         }
     }
 
     if (mPersistFlags & PERSIST_FLAGS_FORCE_ALLOW_COOKIES)
     {
         nsCOMPtr<nsIHttpChannelInternal> httpChannelInternal =
                 do_QueryInterface(inputChannel);
-        if (httpChannelInternal)
-            httpChannelInternal->SetThirdPartyFlags(nsIHttpChannelInternal::THIRD_PARTY_FORCE_ALLOW);
+        if (httpChannelInternal) {
+            rv = httpChannelInternal->SetThirdPartyFlags(nsIHttpChannelInternal::THIRD_PARTY_FORCE_ALLOW);
+            MOZ_ASSERT(NS_SUCCEEDED(rv));
+        }
     }
 
     // Set the referrer, post data and headers if any
     nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(inputChannel));
     if (httpChannel)
     {
         // Referrer
         if (aReferrer)
         {
-            httpChannel->SetReferrerWithPolicy(aReferrer, aReferrerPolicy);
+            rv = httpChannel->SetReferrerWithPolicy(aReferrer, aReferrerPolicy);
+            MOZ_ASSERT(NS_SUCCEEDED(rv));
         }
 
         // Post data
         if (aPostData)
         {
             nsCOMPtr<nsISeekableStream> stream(do_QueryInterface(aPostData));
             if (stream)
             {