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

Unified Diff: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 14362015: WIP enum / V8PerContextData solution (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/bindings/v8/V8PerContextDebugData.h ('k') | Source/bindings/v8/custom/V8InjectedScriptManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
diff --git a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index a4ed4ac24136c94849308c457b9bb30ba0e48c12..fd26de244be8c7a0cec4992a669add35f802de72 100644
--- a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -313,6 +313,11 @@ 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.
+ v8::HandleScope scope;
+ v8::Local<v8::Context> context = v8::Context::GetCurrent();
+ V8ScopedCompilation debuggerCompilation(context, DevtoolsScriptCompilation);
+
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>();
« no previous file with comments | « Source/bindings/v8/V8PerContextDebugData.h ('k') | Source/bindings/v8/custom/V8InjectedScriptManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698