Bug 1113323 - Make sure loadInfo exists before dereferencing the object (r=sicking)
authorChristoph Kerschbaumer <mozilla@christophkerschbaumer.com>
Thu, 18 Dec 2014 13:14:54 -0800
changeset 220461 5e4392cb16c65bcd2561b89616aa9f1c585c65c6
parent 220460 08707baf514f6c59db02ca8023aa91685e4ce627
child 220462 7ea524040974f0bc3ed31b9f1e54d1a58ba90fb5
push id53099
push usermozilla@christophkerschbaumer.com
push dateFri, 19 Dec 2014 00:02:20 +0000
treeherdermozilla-inbound@5e4392cb16c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs1113323
milestone37.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 1113323 - Make sure loadInfo exists before dereferencing the object (r=sicking)
netwerk/base/src/nsIOService.cpp
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -683,17 +683,17 @@ nsIOService::NewChannelFromURIWithProxyF
       // if-clause here and always assert that we indeed have a
       // loadinfo on the newly created channel.
       nsCOMPtr<nsILoadInfo> loadInfo;
       (*result)->GetLoadInfo(getter_AddRefs(loadInfo));
       MOZ_ASSERT(loadInfo);
 
       // If we're sandboxed, make sure to clear any owner the channel
       // might already have.
-      if (loadInfo->GetLoadingSandboxed()) {
+      if (loadInfo && loadInfo->GetLoadingSandboxed()) {
         (*result)->SetOwner(nullptr);
       }
     }
 
     // Some extensions override the http protocol handler and provide their own
     // implementation. The channels returned from that implementation doesn't
     // seem to always implement the nsIUploadChannel2 interface, presumably
     // because it's a new interface.