File tree Expand file tree Collapse file tree
Source/WebKit/UIProcess/API/glib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434#include < mutex>
3535#include < wtf/glib/GRefPtr.h>
3636#include < wtf/glib/GUniquePtr.h>
37+ #include < wtf/text/StringToIntegerConversion.h>
3738
3839namespace WebKit {
3940
@@ -75,8 +76,11 @@ static void initializeRemoteInspectorServer()
7576
7677 auto inspectorHTTPAddress = parseAddress (httpAddress);
7778 GRefPtr<GSocketAddress> inspectorAddress;
78- if (inspectorHTTPAddress)
79- inspectorAddress = adoptGRef (G_SOCKET_ADDRESS (g_inet_socket_address_new (g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (inspectorHTTPAddress.get ())), 0 )));
79+ if (inspectorHTTPAddress) {
80+ String envVar = String::fromLatin1 (getenv (" WEBKIT_INSPECTOR_PORT" ));
81+ auto port = parseInteger<uint16_t >(envVar).value_or (0 );
82+ inspectorAddress = adoptGRef (G_SOCKET_ADDRESS (g_inet_socket_address_new (g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (inspectorHTTPAddress.get ())), port)));
83+ }
8084 else
8185 inspectorAddress = parseAddress (address);
8286 if (!inspectorHTTPAddress && !inspectorAddress) {
You can’t perform that action at this time.
0 commit comments