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

Unified Diff: sky/engine/core/inspector/InjectedScriptManager.cpp

Issue 766683005: Populate scope sections with variable name/values (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Removed unused code Created 6 years, 1 month 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 | « no previous file | sky/engine/v8_inspector/inspector_backend_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/inspector/InjectedScriptManager.cpp
diff --git a/sky/engine/core/inspector/InjectedScriptManager.cpp b/sky/engine/core/inspector/InjectedScriptManager.cpp
index 902d1d065f9ca4f602e466826a0ca4cd6be4f5ea..14baab0e918453d62b474337b5a37aae9758b8a1 100644
--- a/sky/engine/core/inspector/InjectedScriptManager.cpp
+++ b/sky/engine/core/inspector/InjectedScriptManager.cpp
@@ -164,6 +164,11 @@ InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState* inspectedSc
ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource(), inspectedScriptState, id);
InjectedScript result(injectedScriptValue);
m_idToInjectedScript.set(id, result);
+
+ // FIXME(sky): InjecedScript should be available as a regular module rather that using a global variable.
abarth-chromium 2014/11/27 17:17:34 I'd just use a TODO(yurys) here. FIXME(sky) is to
yurys 2014/11/27 17:57:04 Done.
+ v8::Isolate* isolate = inspectedScriptState->isolate();
+ v8::Local<v8::Object> global = inspectedScriptState->context()->Global();
+ global->Set(v8::String::NewFromUtf8(isolate, "injectedScript"), injectedScriptValue.v8ValueUnsafe());
return result;
}
« no previous file with comments | « no previous file | sky/engine/v8_inspector/inspector_backend_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698