[webkit-changes] [WebKit/WebKit] d6b1ac: Remote Web Inspector: [Cocoa] RemoteInspectorCocoa...

Patrick Angle noreply at github.com
Wed Jun 14 18:12:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d6b1aca616b96e2cbb89eb0160ddef87ea78fbe7
      https://github.com/WebKit/WebKit/commit/d6b1aca616b96e2cbb89eb0160ddef87ea78fbe7
  Author: Patrick Angle <pangle at apple.com>
  Date:   2023-06-14 (Wed, 14 Jun 2023)

  Changed paths:
    M Source/JavaScriptCore/inspector/remote/RemoteInspector.h
    M Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h
    M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm

  Log Message:
  -----------
  Remote Web Inspector: [Cocoa] RemoteInspectorCocoa should not attempt to reconnect to (and thus relaunch) a relay that exited cleanly
https://bugs.webkit.org/show_bug.cgi?id=258084
rdar://109617310

Reviewed by BJ Burg and Devin Rousso.

When handling the global notification that a relay has become available, we always first if our current connection to
the relay is valid, in which case we don't need to do any more work. However, for that check to work we set
m_shouldReconnectToRelayOnFailure to true so that upon a failure, we will attempt a single reconnect to a new relay.
This issue exists however where that check is successful and we don't have to reconnect, and therefore we don't have a
chance to set m_shouldReconnectToRelayOnFailure back to false.

To solve this, we have implemented a more formal version of the existing "check" message that expects a success response
from the relay if it doesn't fail, which lets us set the reconnect bit back to false to prevent some future exit of the
relay from causing a reconnection when we don't expect it to, causing a new relay to be started.

* Source/JavaScriptCore/inspector/remote/RemoteInspector.h:
* Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h:
* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::xpcConnectionReceivedMessage):
(Inspector::RemoteInspector::receivedPingSuccessMessage):

Canonical link: https://commits.webkit.org/265173@main




More information about the webkit-changes mailing list