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 |