Bug 1310127 - Part 11: Use MOZ_MUST_USE in netwerk/protocol/http r?aklotz draft
authorWei-Cheng Pan <wpan@mozilla.com>
Tue, 20 Dec 2016 14:51:20 +0800
changeset 494458 00de68796fb93c526fdb1b3603c412f29020ad69
parent 494457 559940afbc5fdfdd1d8fd73ae134b8e2db30d22f
child 494459 9ae2049338e0e342050fcff7f30a162f7771b857
push id48029
push userbmo:wpan@mozilla.com
push dateTue, 07 Mar 2017 03:35:29 +0000
reviewersaklotz
bugs1310127
milestone54.0a1
Bug 1310127 - Part 11: Use MOZ_MUST_USE in netwerk/protocol/http r?aklotz MozReview-Commit-ID: 8rSNln2Tzlu
modules/libjar/nsJARChannel.cpp
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -948,18 +948,18 @@ nsJARChannel::OnDownloadComplete(MemoryD
         channel->GetSecurityInfo(getter_AddRefs(mSecurityInfo));
 
         nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
         if (httpChannel) {
             // We only want to run scripts if the server really intended to
             // send us a JAR file.  Check the server-supplied content type for
             // a JAR type.
             nsAutoCString header;
-            httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Type"),
-                                           header);
+            Unused << httpChannel->GetResponseHeader(
+              NS_LITERAL_CSTRING("Content-Type"), header);
             nsAutoCString contentType;
             nsAutoCString charset;
             NS_ParseResponseContentType(header, contentType, charset);
             nsAutoCString channelContentType;
             channel->GetContentType(channelContentType);
             mIsUnsafe = !(contentType.Equals(channelContentType) &&
                           (contentType.EqualsLiteral("application/java-archive") ||
                            contentType.EqualsLiteral("application/x-jar")));