[Webkit-unassigned] [Bug 238797] [GTK][WPE] RemoteInspector add support for IPv6

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 5 06:47:19 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238797

--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Adrian Perez from comment #5)
> Comment on attachment 456686 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=456686&action=review
> 
> >>>> Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp:83
> >>>> +        inspectorServerAddress.reset(g_strdup_printf("%s:%u", host.get(), inspectorPort));
> >>> 
> >>> Is there any reason why cannot use g_inet_address_to_string() always here
> >>> instead of checking the address family and performing the conversion by
> >>> hand? A quick test shows that it should work as inteded:
> >> 
> >> Yes, g_inet_address_to_string() always returns the address without the square brackets. We could create a new GSocketInetAddress with the required port and then call to_string, but I just avoided to create another GObject.
> > 
> > That's InetSocketAddress, not InetAddress. That gio APIS are quite confusing wityh so many address classes
> 
> But here we *do* have a GInetSocketAddress, note how in line 77 above there
> is an explicit checked cast using the G_INET_SOCKET_ADDRESS() macro. Note
> that the _to_string() method is virtual, and overriden by GInetSocketAddress:
> when using g_inet_address_to_string() on a GInetSocketAddress the overriden
> method from GInetSocketAddress will be used.
> 
> The above can just be:
> 
>     GUniquePtr<char>
> inspectorServerAddress(g_inet_address_to_string(G_INET_ADDRESS(socketAddress.
> get()));

But that's not the port we want, we would need to create a new GInetSocketAddress with the same host but the new port and then call to_string().

>  Hence,
> if one calls g_inet_address_to_string() the implementa

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220405/a601b12c/attachment.htm>


More information about the webkit-unassigned mailing list