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

Unified Diff: Source/bindings/v8/V8LazyEventListener.cpp

Issue 13575004: Apply script preprocessor to Web page scripts only. (Closed) Base URL: https://chromium.googlesource.com/external/WebKit_trimmed.git@master
Patch Set: Re-implment based on review Created 7 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: Source/bindings/v8/V8LazyEventListener.cpp
diff --git a/Source/bindings/v8/V8LazyEventListener.cpp b/Source/bindings/v8/V8LazyEventListener.cpp
index 1bb972c26a036ec830ee380059ac292a9db8ffea..b04a9a530b5f8677e380278592f81d706f744efd 100644
--- a/Source/bindings/v8/V8LazyEventListener.cpp
+++ b/Source/bindings/v8/V8LazyEventListener.cpp
@@ -39,6 +39,7 @@
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8DOMWrapper.h"
#include "bindings/v8/V8HiddenPropertyName.h"
+#include "bindings/v8/V8PerContextDebugData.h"
#include "bindings/v8/V8RecursionScope.h"
#include "core/dom/Document.h"
#include "core/dom/Node.h"
@@ -161,7 +162,11 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
v8::Handle<v8::String> codeExternalString = v8String(code, isolate);
- v8::Handle<v8::Script> script = ScriptSourceCode::compileScript(codeExternalString, m_sourceURL, m_position, 0, isolate);
+ v8::Handle<v8::Script> script;
+ {
+ V8PerContextDebugData::ScopedWebCompilation compileFromWeb(v8Context, true);
+ script = ScriptSourceCode::compileScript(codeExternalString, m_sourceURL, m_position, 0, isolate);
+ }
if (script.IsEmpty())
return;

Powered by Google App Engine
This is Rietveld 408576698