RESOLVED FIXED 217353
[WinCairo][PlayStation] Add handling for accept failure case
https://bugs.webkit.org/show_bug.cgi?id=217353
Summary [WinCairo][PlayStation] Add handling for accept failure case
Basuke Suzuki
Reported 2020-10-05 16:46:34 PDT
When listening RemoteInspectorServer fails to accept new connection, the listening socket goes to invalid situation and need to be recreated from the scrach.
Attachments
PATCH (15.50 KB, patch)
2020-10-06 14:41 PDT, Basuke Suzuki
no flags
PATCH (15.31 KB, patch)
2020-10-27 15:41 PDT, Basuke Suzuki
no flags
Basuke Suzuki
Comment 1 2020-10-06 14:41:50 PDT
Ross Kirsling
Comment 2 2020-10-06 18:44:22 PDT
Comment on attachment 410695 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=410695&action=review Just some naming comments from me. > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorServer.h:50 > - void didClose(RemoteInspectorSocketEndpoint&, ConnectionID) final { }; > + void didStatusChanged(RemoteInspectorSocketEndpoint&, ConnectionID, RemoteInspectorSocketEndpoint::Listener::Status) final { }; This should be `didChangeStatus`. > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.h:168 > + bool isTimeToListen() I think `shouldListen` would be better. > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.h:176 > + MonotonicTime postponeRetryUntil { MonotonicTime::nan() }; How about something like `nextRetryTime`?
Basuke Suzuki
Comment 3 2020-10-07 00:08:59 PDT
(In reply to Ross Kirsling from comment #2) > Comment on attachment 410695 [details] > PATCH > > View in context: > https://bugs.webkit.org/attachment.cgi?id=410695&action=review > > Just some naming comments from me. > > > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorServer.h:50 > > - void didClose(RemoteInspectorSocketEndpoint&, ConnectionID) final { }; > > + void didStatusChanged(RemoteInspectorSocketEndpoint&, ConnectionID, RemoteInspectorSocketEndpoint::Listener::Status) final { }; > > This should be `didChangeStatus`. > > > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.h:168 > > + bool isTimeToListen() > > I think `shouldListen` would be better. > > > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.h:176 > > + MonotonicTime postponeRetryUntil { MonotonicTime::nan() }; > > How about something like `nextRetryTime`? Thanks!
Alex Christensen
Comment 4 2020-10-08 17:21:24 PDT
Comment on attachment 410695 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=410695&action=review > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp:113 > + MonotonicTime mostRecentWakeup = MonotonicTime::nan(); Let's not use nan as a sentinel. Please use Optional<MonotonicTime> instead. > Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.h:55 > + enum class Status { : uint8_t
Basuke Suzuki
Comment 5 2020-10-14 10:52:28 PDT
Comment on attachment 410695 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=410695&action=review Thanks for reviewing! >> Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp:113 >> + MonotonicTime mostRecentWakeup = MonotonicTime::nan(); > > Let's not use nan as a sentinel. Please use Optional<MonotonicTime> instead. Ah, that's better. Thanks >> Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocketEndpoint.h:55 >> + enum class Status { > > : uint8_t Oh my. I don't know why but I misunderstand the behavior of enum class's underlying type decision. For unscoped enum, it is always int when it is unspecified, but for scoped, I believed it is calculated to be the minimum to hold the values. I might be confusing with other specification. thanks.
Basuke Suzuki
Comment 6 2020-10-27 15:41:32 PDT
Alex Christensen
Comment 7 2020-10-28 16:48:00 PDT
Comment on attachment 412468 [details] PATCH I wish there were a way to make this more straightforward.
EWS
Comment 8 2020-10-28 16:51:50 PDT
Committed r269128: <https://trac.webkit.org/changeset/269128> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412468 [details].
Radar WebKit Bug Importer
Comment 9 2020-10-28 16:52:17 PDT
Basuke Suzuki
Comment 10 2020-10-30 12:58:51 PDT
(In reply to Alex Christensen from comment #7) > Comment on attachment 412468 [details] > PATCH > > I wish there were a way to make this more straightforward. Thanks for reviewing! Do you mean something like socket abstraction layer?
Alex Christensen
Comment 11 2020-10-30 14:23:46 PDT
I'm not completely sure what I mean. I think there should be a better abstraction somewhere, but I'm not sure what would make this more straightforward.
Note You need to log in before you can comment on or make changes to this bug.