Skip to content


Browse files Browse the repository at this point in the history
Web Inspector: Console: repeated logs sometimes have the wrong timestamp

Reviewed by Patrick Angle.

We should only update the `timestamp` if the a repated log is not interrupted (i.e. some other message shows up in between, e.g. an evaulation).

* Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js:

Canonical link:
  • Loading branch information
dcrousso committed Apr 21, 2023
1 parent 0420e99 commit 87eec7c
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -161,17 +161,18 @@ WI.JavaScriptLogViewController = class JavaScriptLogViewController extends WI.Ob

var previousIgnoredCount = this._previousMessageView[WI.JavaScriptLogViewController.IgnoredRepeatCount] || 0;
var previousVisibleCount = this._previousMessageView.repeatCount;
this._previousMessageView.timestamp = timestamp;

if (!this._repeatCountWasInterrupted) {
this._previousMessageView.repeatCount = count - previousIgnoredCount;
this._previousMessageView.timestamp = timestamp;
return true;

var consoleMessage = this._previousMessageView.message;
var duplicatedConsoleMessageView = new WI.ConsoleMessageView(consoleMessage);
duplicatedConsoleMessageView[WI.JavaScriptLogViewController.IgnoredRepeatCount] = previousIgnoredCount + previousVisibleCount;
duplicatedConsoleMessageView.repeatCount = 1;
duplicatedConsoleMessageView.timestamp = timestamp;

return true;
Expand Down

0 comments on commit 87eec7c

Please sign in to comment.