Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
index be7f3e81e882c8b7887bf64de77e3015944803c0..6dcb8eefabbf2fe3195c0bd1dfd55f0b55fa298d 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
@@ -73,9 +73,8 @@ |
namespace blink { |
bool ContentSecurityPolicy::IsNonceableElement(const Element* element) { |
- if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled() && |
- isHTMLScriptElement(element)) { |
- if (toHTMLScriptElement(element)->nonce().IsNull()) |
+ if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled()) { |
+ if (element->nonce().IsNull()) |
return false; |
} else if (!element->FastHasAttribute(HTMLNames::nonceAttr)) { |
return false; |