Web Inspector: [REGRESSION] console message count is not updated in scripts and resources panels.
Created attachment 103597 [details] Patch
Comment on attachment 103597 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103597&action=review This does not work for me. Sometimes it leads to resource element bubble and source frame message showing different number of messages. I think this happens because some messages are processed twice in SourceFrame because of an extra MessageAdded event. > Source/WebCore/inspector/front-end/ConsoleView.js:145 > + console.dispatchEventToListeners(WebInspector.ConsoleView.Events.MessageAdded, msg); I believe this could cause side effects
Created attachment 103630 [details] Patch
(In reply to comment #2) > (From update of attachment 103597 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=103597&action=review > > This does not work for me. > Sometimes it leads to resource element bubble and source frame message showing different number of messages. I think this happens because some messages are processed twice in SourceFrame because of an extra MessageAdded event. Thanks for spotting this! We should use last message totalRepeatCount to update source frame bubble properly. > > > Source/WebCore/inspector/front-end/ConsoleView.js:145 > > + console.dispatchEventToListeners(WebInspector.ConsoleView.Events.MessageAdded, msg); > > I believe this could cause side effects There are two listeners: DebuggerPresentationModel and ResourceTreeModel, both add message to messages list and update corresponding source frame. I don't think there can be any side effects.
Looks good to me now.
Comment on attachment 103630 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103630&action=review > Source/WebCore/inspector/front-end/SourceFrame.js:561 > + _updateMessageRepeatCount: function(rowMessage) I'd rather introduce RowMessage class and have this method on the new class, then have RowMessage listening to update events propagated by corresponding ConsoleMessage. What do you think?
(In reply to comment #6) > (From update of attachment 103630 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=103630&action=review > > > Source/WebCore/inspector/front-end/SourceFrame.js:561 > > + _updateMessageRepeatCount: function(rowMessage) > > I'd rather introduce RowMessage class and have this method on the new class, then have RowMessage listening to update events propagated by corresponding ConsoleMessage. What do you think? I think it's a good idea, but quite unrelated to this bug. Maybe we could do this as a separate change since it requires a bunch of additional changes in resources and console?
Committed r92964: <http://trac.webkit.org/changeset/92964>