Bug 1496034 - Remove FeaturePolicy assertion in getter methods, r=bz
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 12 Oct 2018 09:38:44 +0200
changeset 496596 fa33c65b62229b11f418a9f9850f01c59b650d2f
parent 496595 402b42c38c70da770675e64c3f5bc005a98d3b84
child 496597 a6fe44fb6369e1230322a6a1d9d03064e568b7a5
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1496034
milestone64.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 1496034 - Remove FeaturePolicy assertion in getter methods, r=bz
dom/base/nsDocument.cpp
dom/html/HTMLIFrameElement.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -10214,18 +10214,16 @@ nsIDocument::MaybeResolveReadyForIdle()
   if (readyPromise) {
     readyPromise->MaybeResolve(this);
   }
 }
 
 FeaturePolicy*
 nsIDocument::Policy() const
 {
-  MOZ_ASSERT(StaticPrefs::dom_security_featurePolicy_enabled());
-
   // The policy is created when the document is initialized. We _must_ have a
   // policy here even if the featurePolicy pref is off. If this assertion fails,
   // it means that ::Policy() is called before ::StartDocumentLoad().
   MOZ_ASSERT(mFeaturePolicy);
   return mFeaturePolicy;
 }
 
 nsIDOMXULCommandDispatcher*
--- a/dom/html/HTMLIFrameElement.cpp
+++ b/dom/html/HTMLIFrameElement.cpp
@@ -245,17 +245,16 @@ JSObject*
 HTMLIFrameElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return HTMLIFrameElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 FeaturePolicy*
 HTMLIFrameElement::Policy() const
 {
-  MOZ_ASSERT(StaticPrefs::dom_security_featurePolicy_enabled());
   return mFeaturePolicy;
 }
 
 nsresult
 HTMLIFrameElement::GetFeaturePolicyDefaultOrigin(nsIPrincipal** aPrincipal) const
 {
   nsCOMPtr<nsIPrincipal> principal;