Bug 1450726 - Missing null check for mLoadInfo r=jkt
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 02 Apr 2018 20:18:53 +0300
changeset 411670 c6b1a6b5a10ab73a3572e91019294c17a43b1f24
parent 411669 149a759643fbf35d45d4ffbc86706db8ba2d4ffd
child 411671 0da973f5b6101de864c0f39204e106e23ebb097d
push id33764
push usercsabou@mozilla.com
push dateWed, 04 Apr 2018 17:53:18 +0000
treeherdermozilla-central@90eb45ff0a64 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjkt
bugs1450726
milestone61.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 1450726 - Missing null check for mLoadInfo r=jkt MozReview-Commit-ID: Cz7qj1qulK1
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -7321,17 +7321,17 @@ nsHttpChannel::OnStopRequest(nsIRequest 
                 upgradeKey = NS_LITERAL_CSTRING("enabledUpgrade");
             } else {
                 // Content wasn't upgraded but is already HTTPS
                 upgradeKey = NS_LITERAL_CSTRING("enabledNoReason");
             }
         }
         // shift http to https disposition enums
         chanDisposition = static_cast<ChannelDisposition>(chanDisposition + kHttpsCanceled);
-    } else if (mLoadInfo->GetBrowserWouldUpgradeInsecureRequests()) {
+    } else if (mLoadInfo && mLoadInfo->GetBrowserWouldUpgradeInsecureRequests()) {
         // HTTP content the browser would upgrade to HTTPS if upgrading was enabled
         upgradeKey = NS_LITERAL_CSTRING("disabledUpgrade");
     } else {
         // HTTP content that wouldn't upgrade
         upgradeKey = nsMixedContentBlocker::ShouldUpgradeMixedDisplayContent() ?
                      NS_LITERAL_CSTRING("enabledWont") :
                      NS_LITERAL_CSTRING("disabledWont");
     }