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

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

Issue 1362813002: CSP source *.x.y should not match host x.y (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test fixes Created 5 years, 3 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
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.cpp b/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 601b66535037f5f7b3d77c60a933c98215561240..85167e069743e3d1d0fe1ca0b050c28fad75867a 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -223,7 +223,7 @@ DEFINE_TRACE(ContentSecurityPolicy)
Document* ContentSecurityPolicy::document() const
{
- return m_executionContext->isDocument() ? toDocument(m_executionContext) : nullptr;
+ return (m_executionContext && m_executionContext->isDocument()) ? toDocument(m_executionContext) : nullptr;
}
void ContentSecurityPolicy::copyStateFrom(const ContentSecurityPolicy* other)
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698