Bug 113852 - Refine LOG messages in WebSocket related components
Summary: Refine LOG messages in WebSocket related components
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Takeshi Yoshino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 23:48 PDT by Takeshi Yoshino
Modified: 2013-04-03 05:14 PDT (History)
6 users (show)

See Also:


Attachments
Patch (28.00 KB, patch)
2013-04-02 23:51 PDT, Takeshi Yoshino
no flags Details | Formatted Diff | Diff
Patch (28.00 KB, patch)
2013-04-03 01:48 PDT, Takeshi Yoshino
no flags Details | Formatted Diff | Diff
Patch (28.00 KB, patch)
2013-04-03 03:19 PDT, Takeshi Yoshino
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Takeshi Yoshino 2013-04-02 23:48:18 PDT
- LOG messages should contain method names to ease identifying where the event occurred.
- For consistency, make all messages print the pointer of the origin instance.
- Quote UTF8 data in LOG messages.
- For overloaded methods, add the type to clarify which one is run
Comment 1 Takeshi Yoshino 2013-04-02 23:51:25 PDT
Created attachment 196290 [details]
Patch
Comment 2 Kent Tamura 2013-04-03 00:56:49 PDT
Comment on attachment 196290 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=196290&action=review

> Source/WebCore/Modules/websockets/WebSocketChannel.cpp:390
> +        LOG(Network, "WebSocketChannel %p appendToBuffer Buffer overflow (%lu bytes already in receive buffer and appending %lu bytes)", this, static_cast<unsigned long>(m_buffer.size()), static_cast<unsigned long>(len));

appendToBuffer -> appendToBuffer() for consistency?

> Source/WebCore/Modules/websockets/WebSocketChannel.cpp:468
> +    LOG(Network, "WebSocketChannel %p startClosingHandshake code=%d m_receivedClosingHandshake=%d", this, m_closing, m_receivedClosingHandshake);

startClosingHandshake -> startClosingHandshake() ?
Comment 3 Takeshi Yoshino 2013-04-03 01:48:46 PDT
Created attachment 196302 [details]
Patch
Comment 4 Takeshi Yoshino 2013-04-03 01:49:16 PDT
(In reply to comment #2)

Thanks for review. Fixed both.
Comment 5 Takeshi Yoshino 2013-04-03 03:19:52 PDT
Created attachment 196314 [details]
Patch
Comment 6 Takeshi Yoshino 2013-04-03 03:21:18 PDT
(In reply to comment #5)

Sorry for last minute fix. Replaced %p in WebSocket.cpp L356 with '%s' as it's printable URL data.
Comment 7 WebKit Review Bot 2013-04-03 05:14:19 PDT
Comment on attachment 196314 [details]
Patch

Clearing flags on attachment: 196314

Committed r147542: <http://trac.webkit.org/changeset/147542>
Comment 8 WebKit Review Bot 2013-04-03 05:14:24 PDT
All reviewed patches have been landed.  Closing bug.