Bug 1310127 - Part 8: Use MOZ_MUST_USE in netwerk/protocol/http r=mkaply
authorWei-Cheng Pan <wpan@mozilla.com>
Tue, 20 Dec 2016 17:19:46 +0800
changeset 346162 d574affa110cc7b87858f2f00f4345b37fe9ba1c
parent 346161 e7ee73a65e05441119b0e1dafa3815d27bd3172f
child 346163 bd6e0e3fa6190231129f1693cbddfcc0cfbb9a04
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)
reviewersmkaply
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 8: Use MOZ_MUST_USE in netwerk/protocol/http r=mkaply MozReview-Commit-ID: Cd7rL6rpy6e
extensions/pref/autoconfig/src/nsAutoConfig.cpp
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -131,18 +131,18 @@ nsAutoConfig::OnStopRequest(nsIRequest *
                                        static_cast<uint32_t>(aStatus)));
         return readOfflineFile();
     }
 
     // Checking for the http response, if failure go read the failover file.
     nsCOMPtr<nsIHttpChannel> pHTTPCon(do_QueryInterface(request));
     if (pHTTPCon) {
         uint32_t httpStatus;
-        pHTTPCon->GetResponseStatus(&httpStatus);
-        if (httpStatus != 200) 
+        rv = pHTTPCon->GetResponseStatus(&httpStatus);
+        if (NS_FAILED(rv) || httpStatus != 200)
         {
             MOZ_LOG(MCD, LogLevel::Debug, ("mcd http request failed with status %x\n", httpStatus));
             return readOfflineFile();
         }
     }
     
     // Send the autoconfig.jsc to javascript engine.