| 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();
|
| },
|
|
|
|
|