webrtc-internals: filter some events after close [chromium/src : main]

0 views
Skip to first unread message

Philipp Hancke (Gerrit)

unread,
Sep 14, 2022, 6:38:01 AM9/14/22
to Henrik Boström, blink-...@chromium.org

Attention is currently required from: Henrik Boström.

Philipp Hancke would like Henrik Boström to review this change.

View Change

webrtc-internals: filter some events after close

for consistency with how the JS behaves

BUG=chromium:1124234

Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
---
M third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
M third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler_test.cc
2 files changed, 55 insertions(+), 5 deletions(-)


To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Henrik Boström <hb...@chromium.org>
Gerrit-MessageType: newchange

Philipp Hancke (Gerrit)

unread,
Sep 14, 2022, 6:38:15 AM9/14/22
to blink-...@chromium.org, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Henrik Boström.

View Change

1 comment:

  • Patchset:

    • Patch Set #7:

      any idea how to get rid of the low coverage warning? It is not quite clear to me where that originates from :-(

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Henrik Boström <hb...@chromium.org>
Gerrit-Comment-Date: Wed, 14 Sep 2022 10:37:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Henrik Boström (Gerrit)

unread,
Sep 15, 2022, 6:16:13 AM9/15/22
to Harald Alvestrand, blink-...@chromium.org, Philipp Hancke

Attention is currently required from: Harald Alvestrand, Philipp Hancke.

Henrik Boström would like Harald Alvestrand to review this change authored by Philipp Hancke.

View Change

webrtc-internals: filter some events after close

for consistency with how the JS behaves

BUG=chromium:1124234

Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
---
M third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
M third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler_test.cc
2 files changed, 55 insertions(+), 5 deletions(-)


To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-MessageType: newchange

Henrik Boström (Gerrit)

unread,
Sep 15, 2022, 6:16:27 AM9/15/22
to Philipp Hancke, blink-...@chromium.org, Harald Alvestrand, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Philipp Hancke.

View Change

2 comments:

  • Patchset:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • Patch Set #7, Line 2107: TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::TrackSignalingChange");

      pc.onsignalingstatechange does not fire on close(), the philosophy is that if it did not happen asynchronously then there is no need to fire an event; the caller knows we are closing and can act accordingly without the event handler.

      Whether or not you like that philosophy, one could argue that because the chrome://webrtc-internals/ page is not the person that performed pc.close(), having "TrackSignalingChange" expose the fact that the peer connection did close is still relevant information, and there is no need to pretend that "TrackSignalingStateChange" is the same thing as pc.onsignalingstatechange.

      With this CL, it is no longer possible to tell if/when the pc closed? Other than stats no longer updating I guess.

      That being said, I don't have a strong preference whether to include or exclude this event on close...

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Comment-Date: Thu, 15 Sep 2022 10:16:09 +0000

Philipp Hancke (Gerrit)

unread,
Sep 15, 2022, 9:28:00 AM9/15/22
to blink-...@chromium.org, Harald Alvestrand, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Henrik Boström.

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Henrik Boström <hb...@chromium.org>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Sep 2022 13:27:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Henrik Boström <hb...@chromium.org>
Gerrit-MessageType: comment

Henrik Boström (Gerrit)

unread,
Sep 15, 2022, 9:46:45 AM9/15/22
to Philipp Hancke, blink-...@chromium.org, Harald Alvestrand, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Philipp Hancke.

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • close() is still traced. […]

      We don't fire the onsignalingstatechange JS event on pc.close(), but AFAIK we do still fire if "close" happens asynchronously (e.g. due to lid close).

      When I check webrtc-internals on Chrome stable then I already don't see any webrtc-internals event on explicit pc.close(), however I am still able to tell the PC closed due to connection state: "Connection state: new => closed".

      Uhm, so does that mean that this change here really only has a change in behavior for webrtc-internals when laptop lid close happens?

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Sep 2022 13:46:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Philipp Hancke <pha...@microsoft.com>

Henrik Boström (Gerrit)

unread,
Sep 15, 2022, 9:49:40 AM9/15/22
to Philipp Hancke, blink-...@chromium.org, Harald Alvestrand, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Philipp Hancke.

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • We don't fire the onsignalingstatechange JS event on pc. […]

      TLDR:

      • ICE connection state is already suppressed for both JS and webrtc-internals when pc.close() is called.
      • But not if closed due to async event (lid close? context destroyed maybe?).

      Today the reliable way to tell if PC closed in webrtc-internals is with the connection state change, not the iceConnectionState, and this CL does not appear to change that.

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Sep 2022 13:49:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Henrik Boström <hb...@chromium.org>
Comment-In-Reply-To: Philipp Hancke <pha...@microsoft.com>
Gerrit-MessageType: comment

Henrik Boström (Gerrit)

unread,
Sep 15, 2022, 9:50:39 AM9/15/22
to Philipp Hancke, blink-...@chromium.org, Harald Alvestrand, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Philipp Hancke.

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • TLDR: […]

      No idea if lid affects both iceConnectionState and connectionState or just one of the two though

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Sep 2022 13:50:20 +0000

Philipp Hancke (Gerrit)

unread,
Sep 15, 2022, 9:52:44 AM9/15/22
to blink-...@chromium.org, Harald Alvestrand, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Henrik Boström.

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • No idea if lid affects both iceConnectionState and connectionState or just one of the two though

      well, if you close the lid how do you view webrtc-internals? :-)

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Henrik Boström <hb...@chromium.org>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Sep 2022 13:52:19 +0000

Henrik Boström (Gerrit)

unread,
Sep 15, 2022, 9:57:06 AM9/15/22
to Philipp Hancke, blink-...@chromium.org, Harald Alvestrand, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Harald Alvestrand, Philipp Hancke.

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • well, if you close the lid how do you view webrtc-internals? :-)

      you open the lid again :)

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Sep 2022 13:56:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Harald Alvestrand (Gerrit)

unread,
Sep 29, 2022, 4:50:30 AM9/29/22
to Philipp Hancke, blink-...@chromium.org, Henrik Boström, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Philipp Hancke.

View Change

1 comment:

  • Patchset:

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Comment-Date: Thu, 29 Sep 2022 08:48:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Henrik Boström (Gerrit)

unread,
Sep 29, 2022, 5:14:52 AM9/29/22
to Philipp Hancke, blink-...@chromium.org, Harald Alvestrand, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Philipp Hancke.

Patch set 7:Code-Review +1

View Change

1 comment:

  • File third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:

    • you open the lid again :)

      I think we can still tell if close happened so I'll let you decide, but if you have the ability to test lid closing, do check if webrtc-internals is updated accordingly (check that there is info about it being closed after you open the lid again)

To view, visit change 3883820. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib5fc2b726ad81ed00cd59af2afc75fb27f85e2c2
Gerrit-Change-Number: 3883820
Gerrit-PatchSet: 7
Gerrit-Owner: Philipp Hancke <pha...@microsoft.com>
Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
Gerrit-Reviewer: Henrik Boström <hb...@chromium.org>
Gerrit-Reviewer: Philipp Hancke <pha...@microsoft.com>
Gerrit-Attention: Philipp Hancke <pha...@microsoft.com>
Gerrit-Comment-Date: Thu, 29 Sep 2022 09:13:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Reply all
Reply to author
Forward
0 new messages