summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/v8/V8LazyEventListener.cpp')
-rw-r--r--Source/WebCore/bindings/v8/V8LazyEventListener.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebCore/bindings/v8/V8LazyEventListener.cpp b/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
index 7f46333..0e2c368 100644
--- a/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
+++ b/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "V8LazyEventListener.h"
+#include "ContentSecurityPolicy.h"
#include "Frame.h"
#include "V8Binding.h"
#include "V8HiddenPropertyName.h"
@@ -80,6 +81,9 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
if (hasExistingListenerObject())
return;
+ if (context->isDocument() && !static_cast<Document*>(context)->contentSecurityPolicy()->allowInlineEventHandlers())
+ return;
+
v8::HandleScope handleScope;
V8Proxy* proxy = V8Proxy::retrieve(context);