Bug 28856 - console log message repeat count double what it should be
Summary: console log message repeat count double what it should be
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 14:26 PDT by Patrick Mueller
Modified: 2009-09-01 07:41 PDT (History)
3 users (show)

See Also:


Attachments
fix merge (too much fuzz) (1.21 KB, patch)
2009-09-01 07:23 PDT, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Mueller 2009-08-31 14:26:04 PDT
Steps:

1. Traverse to a web page in a WebKit nightly
2. Open Web Inspector
3. Open the console.
4. Enter the text 'console.log("message")' and press Enter.

Expected: to see the unadorned message in the console.
Actual: message with a colored prefix of "2" indicating the message has been logged twice.

5. Enter the text 'console.log("message");console.log("message")' and press Enter.

Expected: to see the message with a colored prefix of "2" indicating the message has been logged twice.
Actual: message with a colored prefix of "4".
Comment 1 Joseph Pecoraro 2009-08-31 16:59:46 PDT
WebInspector.addMessageToConsole gets called twice, which makes me think that this is coming from the C++ side of things, not JavaScript.  Nothing jumped out at me in the last few Console.cpp changes.

Also, CC'ing some people on this, you can always use:
http://bugs.webkit.decenturl.com/new-web-inspector-bug
Comment 2 Patrick Mueller 2009-09-01 06:47:27 PDT
I was poking around ConsoleMessage.cpp and friends and noticed a "sameness" check for the messages in InspectorController::addConsoleMessage(), so I naively just commented out the line:

   m_previousMessage->incrementCount();

result is never seeing a repeat count in the console.  So at this point, I'm guessing that this repeatCount calculation is required, and the one in addMessage() in ConsoleView.js needs tweaking.
Comment 3 Pavel Feldman 2009-09-01 07:23:07 PDT
Created attachment 38864 [details]
fix merge (too much fuzz)
Comment 4 Pavel Feldman 2009-09-01 07:41:39 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/InjectedScript.js
Committed r47933