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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js

Issue 2344813002: Revert "[DevTools] Make log agent optional." (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 | third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
index 20d6df070b8ac8afa91d05459657a515ec22cf8a..a77974c551e79737e4dc2ece37723649b288618a 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
@@ -32,9 +32,8 @@
* @constructor
* @extends {WebInspector.SDKModel}
* @param {!WebInspector.Target} target
- * @param {?Protocol.LogAgent} logAgent
*/
-WebInspector.ConsoleModel = function(target, logAgent)
+WebInspector.ConsoleModel = function(target)
{
WebInspector.SDKModel.call(this, WebInspector.ConsoleModel, target);
@@ -45,11 +44,9 @@ WebInspector.ConsoleModel = function(target, logAgent)
this._warnings = 0;
this._errors = 0;
this._revokedErrors = 0;
- this._logAgent = logAgent;
- if (this._logAgent) {
- target.registerLogDispatcher(new WebInspector.LogDispatcher(this));
- this._logAgent.enable();
- }
+ this._logAgent = target.logAgent();
+ target.registerLogDispatcher(new WebInspector.LogDispatcher(this));
+ this._logAgent.enable();
}
/** @enum {symbol} */
@@ -137,7 +134,7 @@ WebInspector.ConsoleModel.prototype = {
requestClearMessages: function()
{
- this._logAgent && this._logAgent.clear();
+ this._logAgent.clear();
this.clear();
},
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698