WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226539
Web Inspector: [Cocoa] `RemoteInspector` won't connect to a new relay if it hasn't yet failed to communicate with a previously connected relay
https://bugs.webkit.org/show_bug.cgi?id=226539
Summary
Web Inspector: [Cocoa] `RemoteInspector` won't connect to a new relay if it h...
Patrick Angle
Reported
2021-06-02 09:46:20 PDT
<
rdar://78237764
>
Attachments
Patch v1.0
(5.91 KB, patch)
2021-06-02 12:34 PDT
,
Patrick Angle
no flags
Details
Formatted Diff
Diff
Patch v1.1 - Review nits
(5.97 KB, patch)
2021-06-03 11:03 PDT
,
Patrick Angle
no flags
Details
Formatted Diff
Diff
Patch v1.1.1 - Add reviewer to changelog
(5.97 KB, patch)
2021-06-03 11:35 PDT
,
Patrick Angle
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-06-02 09:46:39 PDT
<
rdar://problem/78768633
>
Patrick Angle
Comment 2
2021-06-02 12:34:53 PDT
Created
attachment 430392
[details]
Patch v1.0
Patrick Angle
Comment 3
2021-06-02 12:43:33 PDT
Correct radar is <
rdar://78237764
>
Ryan Haddad
Comment 4
2021-06-02 12:49:54 PDT
<
rdar://78237764
>
Devin Rousso
Comment 5
2021-06-02 16:34:14 PDT
Comment on
attachment 430392
[details]
Patch v1.0 View in context:
https://bugs.webkit.org/attachment.cgi?id=430392&action=review
r=me, nice fix with a great explanation :)
> Source/JavaScriptCore/inspector/remote/RemoteInspector.h:263 > + bool m_allowRetryRelayConnection { false };
NIT: How about something a bit more specific/explanatory like `m_shouldReconnectToRelayOnFailure`?
> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:281 > + m_relayConnection->sendMessage(@"syn", nil);
NIT: I wonder if maybe we should give this a different name so it shows up differently in logging. If we do keep the same name, perhaps we should create a static constant instead of hardcoding in both spots?
> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:376 > + if (m_allowRetryRelayConnection) {
Style: I'd make this into an early return
> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:377 > + WTFLogAlways("RemoteInspector XPC connection to relay failed, reattempting connection...");
NIT: s/reattempting connection/reconnecting/
> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:380 > + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
Should we maybe wait a second or two before attempting to reconnect?
> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:384 > + m_allowRetryRelayConnection = false;
NIT: I'd put this as the first thing in the `if` so that if someone adds an early return in the future it's less likely to be missed/forgotten
Patrick Angle
Comment 6
2021-06-03 11:03:23 PDT
Created
attachment 430484
[details]
Patch v1.1 - Review nits
Patrick Angle
Comment 7
2021-06-03 11:35:41 PDT
Created
attachment 430491
[details]
Patch v1.1.1 - Add reviewer to changelog
EWS
Comment 8
2021-06-03 12:32:29 PDT
Committed
r278413
(
238438@main
): <
https://commits.webkit.org/238438@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 430491
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug