Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp |
index 13137450a7607b6a13a482ad6800cc33154b1ff5..bb37d8da8f989ead6de4a7adeec3d402b8a5e91c 100644 |
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp |
@@ -467,17 +467,17 @@ WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, |
if (!frame) |
return WebString(); |
- if (!m_element->document().contentSecurityPolicy()->allowJavaScriptURLs( |
- m_element, m_element->document().url(), OrdinalNumber())) { |
- return WebString(); |
- } |
- |
const KURL& kurl = url; |
DCHECK(kurl.protocolIs("javascript")); |
String script = decodeURLEscapeSequences( |
kurl.getString().substring(strlen("javascript:"))); |
+ if (!m_element->document().contentSecurityPolicy()->allowJavaScriptURLs( |
+ m_element, script, m_element->document().url(), OrdinalNumber())) { |
+ return WebString(); |
+ } |
+ |
UserGestureIndicator gestureIndicator( |
popupsAllowed ? DocumentUserGestureToken::create( |
frame->document(), UserGestureToken::NewGesture) |