Bug 1175299 - Translate the content policy type obtained in nsMixedContentBlocker::AsyncOnChannelRedirect to an external one before invoking the content policy implementation; r=smaug
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 16 Jun 2015 17:49:21 -0400
changeset 267392 eca8d9db5581148d45be58d0085fe3ab64c8876b
parent 267391 12afd3e6ae244c1df56f3eadf07a15b8aa005442
child 267393 28bbcf8f9e1a52d34b349a7d8faa7448a6b034f2
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1175299
milestone41.0a1
Bug 1175299 - Translate the content policy type obtained in nsMixedContentBlocker::AsyncOnChannelRedirect to an external one before invoking the content policy implementation; r=smaug
dom/security/nsMixedContentBlocker.cpp
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -266,17 +266,17 @@ nsMixedContentBlocker::AsyncOnChannelRed
       return NS_OK;
     }
     // We set the requestingLocation from the RequestingPrincipal.
     rv = requestingPrincipal->GetURI(getter_AddRefs(requestingLocation));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   int16_t decision = REJECT_REQUEST;
-  rv = ShouldLoad(contentPolicyType,
+  rv = ShouldLoad(nsContentUtils::InternalContentPolicyTypeToExternal(contentPolicyType),
                   newUri,
                   requestingLocation,
                   loadInfo->LoadingNode(),
                   EmptyCString(),       // aMimeGuess
                   nullptr,              // aExtra
                   requestingPrincipal,
                   &decision);
   NS_ENSURE_SUCCESS(rv, rv);