[Webkit-unassigned] [Bug 121123] Web Inspector: Do not try to parse incomplete HTTP requests

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


Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
 Attachment #211555|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |

--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com>  2013-09-14 00:33:22 PST ---
(From update of attachment 211555)
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(), "", 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'

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list