[webkit-reviews] review denied: [Bug 121123] Web Inspector: Do not try to parse incomplete HTTP requests : [Attachment 211555] Patch addressing Carlos review

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 14 00:34:11 PDT 2013


Carlos Garcia Campos <cgarcia at igalia.com> has denied Andre Moreira Magalhaes
<andrunko at gmail.com>'s request for review:
Bug 121123: Web Inspector: Do not try to parse incomplete HTTP requests
https://bugs.webkit.org/show_bug.cgi?id=121123

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

------- Additional Comments from Carlos Garcia Campos <cgarcia at igalia.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=211555&action=review


> Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp:249
> +    GRefPtr<GSocketClient> client = g_socket_client_new();
> +    GRefPtr<GSocketConnection> connection =
g_socket_client_connect_to_host(client.get(), "127.0.0.1", 2999, 0,
&error.outPtr());

This is still wrong, you have to adopt the reference with adoptGRef().

> Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp:264
> +    g_input_stream_read_async(istream, response, sizeof(response) - 1,
G_PRIORITY_DEFAULT, 0, 0, 0);

Since the operation might never finish, I think it would be better to pass a
cancellable, and cancel the operation before the test finish so that the thread
used to implement the async operation exits.

> Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp:268
>      g_assert(String(response).isEmpty());

You don't need to convert the buffer to a String just to check if it's empty,
you can simply check response[0] == '\0'


More information about the webkit-reviews mailing list