Bug 208391

Summary: [WinCairo][PlayStation] Add interface to get listening port of RemoteInspectorServer
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: PlatformAssignee: Basuke Suzuki <basuke>
Status: RESOLVED FIXED    
Severity: Normal CC: basuke, commit-queue, don.olmstead, ews-watchlist, hi, joepeck, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 208349    
Attachments:
Description Flags
PATCH
none
PATCH none

Basuke Suzuki
Reported 2020-02-28 13:58:07 PST
Current implementation cannot allow client to specify server address to listen. It is safe to specify "127.0.0.1" when no access from outside is needed. Also if server picks port number available, it is also handy.
Attachments
PATCH (2.66 KB, patch)
2020-03-03 10:48 PST, Basuke Suzuki
no flags
PATCH (2.66 KB, patch)
2020-03-03 11:35 PST, Basuke Suzuki
no flags
Basuke Suzuki
Comment 1 2020-03-03 10:44:46 PST
Change the title. Now client can get the listening port when passing zero as a port number to allow system to pick an available port.
Basuke Suzuki
Comment 2 2020-03-03 10:48:51 PST
Ross Kirsling
Comment 3 2020-03-03 10:53:58 PST
Comment on attachment 392296 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=392296&action=review > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorServer.cpp:61 > + if (isRunning()) > + return WTF::nullopt; Shouldn't this condition be negative?
Ross Kirsling
Comment 4 2020-03-03 10:56:02 PST
Comment on attachment 392296 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=392296&action=review > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorServer.cpp:52 > auto& endpoint = Inspector::RemoteInspectorSocketEndpoint::singleton(); > + if (isRunning()) > + return false; Also it seems like the early out can precede the declaration here.
Don Olmstead
Comment 5 2020-03-03 11:00:05 PST
Comment on attachment 392296 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=392296&action=review > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorServer.cpp:53 > + if (isRunning()) > + return false; > + Shouldn't this go at the start? You don't use endpoint before this check. > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorServer.h:42 > + JS_EXPORT_PRIVATE Optional<uint16_t> RemoteInspectorServer::getPort(); Copy pasta error?
Basuke Suzuki
Comment 6 2020-03-03 11:26:10 PST
Comment on attachment 392296 [details] PATCH Sorry for too many casual mistake.
Basuke Suzuki
Comment 7 2020-03-03 11:35:49 PST
Created attachment 392304 [details] PATCH I got a coffee. My brain is now working.
WebKit Commit Bot
Comment 8 2020-03-03 12:24:15 PST
Comment on attachment 392304 [details] PATCH Clearing flags on attachment: 392304 Committed r257795: <https://trac.webkit.org/changeset/257795>
WebKit Commit Bot
Comment 9 2020-03-03 12:24:17 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2020-03-03 12:25:17 PST
Note You need to log in before you can comment on or make changes to this bug.