Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 2801243002: More tweaks to <script nonce> hiding. (Closed)
Patch Set: Element. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698