Chromium Code Reviews| Index: Source/devtools/front_end/ConsoleModel.js |
| diff --git a/Source/devtools/front_end/ConsoleModel.js b/Source/devtools/front_end/ConsoleModel.js |
| index a97dcff6092ed219b0f6fe167dae8639dd2846d6..8ba3ce11a051d0baedb196d896c23973d24322aa 100644 |
| --- a/Source/devtools/front_end/ConsoleModel.js |
| +++ b/Source/devtools/front_end/ConsoleModel.js |
| @@ -129,7 +129,7 @@ WebInspector.ConsoleModel.prototype = { |
| /** |
| * @param {number} count |
| */ |
| - _messageRepeatCountUpdated: function(count) |
| + _messageRepeatCountUpdated: function(count, timestamp) |
| { |
| var msg = this._previousMessage; |
| if (!msg) |
| @@ -138,6 +138,7 @@ WebInspector.ConsoleModel.prototype = { |
| var prevRepeatCount = msg.totalRepeatCount; |
| if (!this._interruptRepeatCount) { |
| + msg.timestamp = timestamp; |
| msg.repeatDelta = count - prevRepeatCount; |
| msg.repeatCount = msg.repeatCount + msg.repeatDelta; |
| msg.totalRepeatCount = count; |
| @@ -146,6 +147,7 @@ WebInspector.ConsoleModel.prototype = { |
| this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.RepeatCountUpdated, msg); |
| } else { |
| var msgCopy = msg.clone(); |
| + msgCopy.timestamp = timestamp; |
| msgCopy.totalRepeatCount = count; |
| msgCopy.repeatCount = (count - prevRepeatCount) || 1; |
| msgCopy.repeatDelta = msgCopy.repeatCount; |
| @@ -169,9 +171,10 @@ WebInspector.ConsoleModel.prototype = { |
| * @param {!NetworkAgent.RequestId=} requestId |
| * @param {!Array.<!RuntimeAgent.RemoteObject>=} parameters |
| * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace |
| + * @param {number=} timestamp |
| * @param {boolean=} isOutdated |
| */ |
| -WebInspector.ConsoleMessage = function(source, level, text, type, url, line, column, repeatCount, requestId, parameters, stackTrace, isOutdated) |
| +WebInspector.ConsoleMessage = function(source, level, text, type, url, line, column, repeatCount, requestId, parameters, stackTrace, timestamp, isOutdated) |
| { |
| this.source = source; |
| this.level = level; |
| @@ -182,6 +185,7 @@ WebInspector.ConsoleMessage = function(source, level, text, type, url, line, col |
| this.column = column || 0; |
| this.parameters = parameters; |
| this.stackTrace = stackTrace; |
| + this.timestamp = timestamp || Date.now() / 1000; |
| this.isOutdated = isOutdated; |
| repeatCount = repeatCount || 1; |
| @@ -205,7 +209,7 @@ WebInspector.ConsoleMessage.prototype = { |
| */ |
| clone: function() |
| { |
| - return new WebInspector.ConsoleMessage(this.source, this.level, this.text, this.type, this.url, this.line, this.column, this.repeatCount, this.requestId, this.parameters, this.stackTrace, this.isOutdated); |
| + return new WebInspector.ConsoleMessage(this.source, this.level, this.text, this.type, this.url, this.line, this.column, this.repeatCount, this.requestId, this.parameters, this.stackTrace, this.timestamp, this.isOutdated); |
| }, |
| /** |
| @@ -233,6 +237,7 @@ WebInspector.ConsoleMessage.prototype = { |
| } |
| } |
| + // Timestamp doesn't affect equality. |
|
eustas
2014/03/06 15:40:05
This will cause grouping whereas we don't want it.
|
| return (this.source === msg.source) |
| && (this.type === msg.type) |
| && (this.level === msg.level) |
| @@ -311,6 +316,7 @@ WebInspector.ConsoleDispatcher.prototype = { |
| payload.networkRequestId, |
| payload.parameters, |
| payload.stackTrace, |
| + payload.timestamp, |
| this._console._enablingConsole); |
| this._console.addMessage(consoleMessage, true); |
| }, |
| @@ -318,9 +324,9 @@ WebInspector.ConsoleDispatcher.prototype = { |
| /** |
| * @param {number} count |
| */ |
| - messageRepeatCountUpdated: function(count) |
| + messageRepeatCountUpdated: function(count, timestamp) |
| { |
| - this._console._messageRepeatCountUpdated(count); |
| + this._console._messageRepeatCountUpdated(count, timestamp); |
| }, |
| messagesCleared: function() |