[webkit-reviews] review granted: [Bug 223236] [SOUP] SOUP3 crashes inside soup_message_set_request_body : [Attachment 423468] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 18 03:40:52 PDT 2021


Adrian Perez <aperez at igalia.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 223236: [SOUP] SOUP3 crashes inside soup_message_set_request_body
https://bugs.webkit.org/show_bug.cgi?id=223236

Attachment 423468: Patch

https://bugs.webkit.org/attachment.cgi?id=423468&action=review




--- Comment #7 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 423468
  --> https://bugs.webkit.org/attachment.cgi?id=423468
Patch

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

> Source/WebCore/platform/network/soup/WebKitFormDataInputStream.cpp:137
> +    // GFileInputStream is not pollable, so the stream is only pollable if
FormData doesn't contain EncodedFileData elements.

I wonder if it could be an options to check whether a GInputStream is a
GUnixInputStream
(which does implement GPollableInputStream) which would make the file elements
pollable,
or whether the GInputStream implements the GFileDescriptorBased interface, in
which case
we could use the _get_fd() method and use GPollFD or similar ��️

(No need to change anything in this patch, by the way, this is just me mulling
ideas
over. If you think any of this makes sense for a follow-up patch it would be
nice
to write it down as a TODO and/or make a new Bugzilla issue to track it.)

> Source/WebCore/platform/network/soup/WebKitFormDataInputStream.cpp:177
> +    return g_pollable_source_new_full(stream, base.get(), cancellable);

Aren't these two lines equivalent to a plain
g_pollable_input_stream_create_source() call?
As in:

   return g_pollable_input_stream_create_source(stream, cancellable);


More information about the webkit-reviews mailing list