[webkit-reviews] review granted: [Bug 73855] WebInspectorServer for WebKit2. : [Attachment 135099] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 3 03:32:10 PDT 2012


Simon Hausmann <hausmann at webkit.org> has granted Jocelyn Turcotte
<jocelyn.turcotte at nokia.com>'s request for review:
Bug 73855: WebInspectorServer for WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=73855

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

------- Additional Comments from Simon Hausmann <hausmann at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=135099&action=review


> Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp:57
> +WebInspectorServer* WebInspectorServer::server()
> +{
> +    static WebInspectorServer* s_server = new WebInspectorServer;
> +    return s_server;
> +}

I think the more common pattern is a reference and a shared() method, like
this:


WebProcess& WebProcess::shared()
{
    static WebProcess& process = *new WebProcess;
    return process;
}

> Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp:106
> +    String path = request->url();

A comment would be good here explaining how what seems like a generic url is
just the path that follows the "GET " of the HTTP request.

> Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:65
> +    ClientMap::iterator end = m_clientMap.end();
> +
> +    StringBuilder builder;
> +    builder.append("[ ");
> +    for (ClientMap::iterator iter = m_clientMap.begin(); iter != end;
++iter) {

I suggest to move the end variable declaration closer to the for loop.


More information about the webkit-reviews mailing list