Index: Source/bindings/core/v8/WindowProxy.cpp |
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp |
index 0a33287217d8a648bc119cc2c18a5999d342dd11..db2a3b094bde30ac29da7bd5ff0f0c5338d2532c 100644 |
--- a/Source/bindings/core/v8/WindowProxy.cpp |
+++ b/Source/bindings/core/v8/WindowProxy.cpp |
@@ -217,8 +217,10 @@ bool WindowProxy::initialize() |
if (m_frame->document()) { |
setSecurityToken(m_frame->document()->securityOrigin()); |
ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPolicy(); |
- context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurityPolicy::SuppressReport)); |
- context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, csp->evalDisabledErrorMessage())); |
+ if (csp) { |
+ context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurityPolicy::SuppressReport)); |
+ context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, csp->evalDisabledErrorMessage())); |
+ } |
} |
} else { |
updateActivityLogger(); |