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

Unified Diff: Source/devtools/front_end/ConsoleModel.js

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 years, 9 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/devtools/front_end/CSSStyleModel.js ('k') | Source/devtools/front_end/ConsoleView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ConsoleModel.js
diff --git a/Source/devtools/front_end/ConsoleModel.js b/Source/devtools/front_end/ConsoleModel.js
index a63d5a4b93e981e10f861c26405a38007d75e1ad..c396d81f2fde50447bc98e9855ce7325155eae7a 100644
--- a/Source/devtools/front_end/ConsoleModel.js
+++ b/Source/devtools/front_end/ConsoleModel.js
@@ -30,16 +30,17 @@
/**
* @constructor
- * @extends {WebInspector.Object}
+ * @extends {WebInspector.TargetAwareObject}
* @param {!WebInspector.Target} target
*/
WebInspector.ConsoleModel = function(target)
{
+ WebInspector.TargetAwareObject.call(this, target);
+
/** @type {!Array.<!WebInspector.ConsoleMessage>} */
this.messages = [];
this.warnings = 0;
this.errors = 0;
- this._target = target;
this._consoleAgent = target.consoleAgent();
target.registerConsoleDispatcher(new WebInspector.ConsoleDispatcher(this));
this._enableAgent();
@@ -117,7 +118,7 @@ WebInspector.ConsoleModel.prototype = {
this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvaluated, {result: result, wasThrown: wasThrown, text: text, commandMessage: commandMessage});
}
- this._target.runtimeModel.evaluate(text, "console", useCommandLineAPI, false, false, true, printResult.bind(this));
+ this.target().runtimeModel.evaluate(text, "console", useCommandLineAPI, false, false, true, printResult.bind(this));
WebInspector.userMetrics.ConsoleEvaluated.record();
},
@@ -190,7 +191,7 @@ WebInspector.ConsoleModel.prototype = {
this.warnings = 0;
},
- __proto__: WebInspector.Object.prototype
+ __proto__: WebInspector.TargetAwareObject.prototype
}
/**
« no previous file with comments | « Source/devtools/front_end/CSSStyleModel.js ('k') | Source/devtools/front_end/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698