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

Unified Diff: Source/bindings/v8/custom/V8InjectedScriptHostCustom.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: Rebase, simplify 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/custom/V8InjectedScriptHostCustom.cpp
diff --git a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index fb7ce20fd550142279eed75d4f3377c4ed05d34c..5f7df866928c696345c4f7b67ae67b58f9432555 100644
--- a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -306,6 +306,9 @@ v8::Handle<v8::Value> V8InjectedScriptHost::evaluateMethodCustom(const v8::Argum
if (expression.IsEmpty())
return v8::ThrowException(v8::Exception::Error(v8::String::New("The argument must be a string.")));
+ // Mark the context as temporarily used by debugger.
+ V8PerContextDebugData::SystemScope systemScope(v8::Context::GetCurrent());
+
v8::Handle<v8::Script> script = v8::Script::Compile(expression);
if (script.IsEmpty()) // Return immediately in case of exception to let the caller handle it.
return v8::Handle<v8::Value>();

Powered by Google App Engine
This is Rietveld 408576698