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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2364693002: [DevTools] Use selected target for console eval (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index 546d6da6fbef2ea8f41e31b7d3c8137f8d737aa2..b9614d6a18696f964768eeac66422ab612f731b2 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -803,13 +803,12 @@ WebInspector.ConsoleView.prototype = {
if (!str.length)
return;
- var target = WebInspector.targetManager.mainTarget();
var currentExecutionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
- if (!this._prompt.isCaretAtEndOfPrompt() || !target || !currentExecutionContext) {
+ if (!this._prompt.isCaretAtEndOfPrompt() || !currentExecutionContext) {
this._appendCommand(str, true);
return;
}
- target.runtimeModel.compileScript(str, "", false, currentExecutionContext.id, compileCallback.bind(this));
+ currentExecutionContext.target().runtimeModel.compileScript(str, "", false, currentExecutionContext.id, compileCallback.bind(this));
/**
* @param {!RuntimeAgent.ScriptId=} scriptId
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698