Bug 792101 - security.mixed_content.block_active_content causes crash in nsMixedContentBlocker::ShouldLoad (r=smaug)
authorTanvi Vyas <tvyas@mozilla.com>
Tue, 25 Sep 2012 10:51:51 -0700
changeset 108041 e0dbda5b3ac47d413953c021c326dad5f0d111b3
parent 108040 554edcc7f2ab0e2ed8db3dd1752d7a715ebce78e
child 108042 9211f1307e00b3375225122ebdeb6a406f2c284b
push id23533
push usermlamouri@mozilla.com
push dateWed, 26 Sep 2012 10:57:37 +0000
treeherdermozilla-central@df69d95f636c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs792101
milestone18.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 792101 - security.mixed_content.block_active_content causes crash in nsMixedContentBlocker::ShouldLoad (r=smaug)
content/base/src/nsMixedContentBlocker.cpp
--- a/content/base/src/nsMixedContentBlocker.cpp
+++ b/content/base/src/nsMixedContentBlocker.cpp
@@ -190,12 +190,21 @@ nsMixedContentBlocker::ShouldProcess(PRU
                                      nsIURI* aContentLocation,
                                      nsIURI* aRequestingLocation,
                                      nsISupports* aRequestingContext,
                                      const nsACString& aMimeGuess,
                                      nsISupports* aExtra,
                                      nsIPrincipal* aRequestPrincipal,
                                      PRInt16* aDecision)
 {
+  if(!aContentLocation) {
+    // aContentLocation may be null when a plugin is loading without an associated URI resource
+    if(aContentType == TYPE_OBJECT) {
+       return NS_OK;
+    } else {
+       return NS_ERROR_FAILURE;
+    }
+  }
+
   return ShouldLoad(aContentType, aContentLocation, aRequestingLocation,
                     aRequestingContext, aMimeGuess, aExtra, aRequestPrincipal,
                     aDecision);
 }