[webkit-reviews] review denied: [Bug 54226] [Chromium] WebSocket: Implement WebKit::WebSocketStreamError : [Attachment 82033] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 4 21:09:24 PDT 2011


Darin Fisher (:fishd, Google) <fishd at chromium.org> has denied Yuta Kitamura
<yutak at chromium.org>'s request for review:
Bug 54226: [Chromium] WebSocket: Implement WebKit::WebSocketStreamError
https://bugs.webkit.org/show_bug.cgi?id=54226

Attachment 82033: Patch
https://bugs.webkit.org/attachment.cgi?id=82033&action=review

------- Additional Comments from Darin Fisher (:fishd, Google)
<fishd at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=82033&action=review

> Source/WebKit/chromium/src/WebSocketStreamError.cpp:46
> +    WTF::String errorDescription(m_errorDescription);

should be no need for WTF:: in .cpp file.  please add a 'using namespace
WebCore' at the
top so you don't need the WebCore:: prefixes either.

also, i don't think you need this temporary.

> Source/WebKit/chromium/src/WebSocketStreamError.cpp:47
> +    WTF::String
failingURL(static_cast<WebCore::KURL>(m_failingURL).string());

instead of casting to KURL, please just construct a KURL.  casts are ugly, but
WebURL provides the casting operator so that you can just construct a KURL from

a WebURL w/o having to make KURL know about WebURL.

come to think about it, perhaps it would be more consistent w/ webkit API
conventions if this function were a casting operator to
WebCore::SocketStreamError.
then when using WebSocketStreamError, you could just happily pass those objects
to
methods expecting a WebCore::SocketStreamError :)

> Source/WebKit/chromium/src/WebSocketStreamError.cpp:48
> +    return WebCore::SocketStreamError(m_errorCode, failingURL,
errorDescription);

i think you should be able to compact to this:

return WebCore::SocketStreamError(m_errorCode, KURL(failingURL).string(),
m_errorDescription);


More information about the webkit-reviews mailing list