New issue
Advanced search Search tips

Issue 851421 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Ship [current/pending][Local/Remote]Description

Project Member Reported by hbos@chromium.org, Jun 11 2018

Issue description

That is, ship...

RTCPeerConnection.currentLocalDescription
RTCPeerConnection.pendingLocalDescription
RTCPeerConnection.currentRemoteDescription
RTCPeerConnection.pendingRemoteDescription

They are available in the lower layers.
They must be surfaced at the same time as the rest of setLocalDescription/setRemoteDescription to avoid flaky bugs, see how signalingState + onsignalingstatechange is surfaced.
 
Owner: hta@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0637ce3f178c65389d0447bd71f3cc3868703784

commit 0637ce3f178c65389d0447bd71f3cc3868703784
Author: Harald Alvestrand <hta@chromium.org>
Date: Thu Aug 16 10:57:48 2018

Add RTCPeerConnection current*Description and pending*Description

Bug: chromium:851421
Change-Id: I931316701bbd406ddca8f4fad9222bfc7752c126
Reviewed-on: https://chromium-review.googlesource.com/1174432
Reviewed-by: Florent Castelli <orphis@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583599}
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/content/renderer/media/webrtc/rtc_peer_connection_handler.h
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-constructor-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-createOffer-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt
[delete] https://crrev.com/f9e193268df38feda0cfd6d63f87bc04ed2ded7e/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt
[delete] https://crrev.com/f9e193268df38feda0cfd6d63f87bc04ed2ded7e/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setRemoteDescription-answer-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt
[delete] https://crrev.com/f9e193268df38feda0cfd6d63f87bc04ed2ded7e/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setRemoteDescription-pranswer-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/external/wpt/webrtc/idlharness.https.window-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-createOffer-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/idlharness.https.window-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/blink/public/platform/web_rtc_peer_connection_handler.h
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.idl
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/blink/renderer/platform/testing/testing_platform_support_with_web_rtc.cc
[modify] https://crrev.com/0637ce3f178c65389d0447bd71f3cc3868703784/third_party/blink/renderer/platform/testing/testing_platform_support_with_web_rtc.h

All of the description attributes probably will not behave correctly when used in the same task execution cycle as setLocal/RemoteDescription because of our broken threading model.

We should add WPT for that.

E.g.

pc.set[Local/Remote]Description(sdp).then(() => {
  console.log('After setting description: ' +
              pc.[current/pending][Local/Remote]Description);
});
console.log('Before setting description: ' +
            pc.[current/pending][Local/Remote]Description);

"Before" would probably show the result of "after" because of letting the threads sync up.
Solution is to either fix the broken threading model (not possible without substantial redesign of lower layers / rethinking threading model) or to always surface all state changes in the same callbacks and to keep a cache in blink layer (e.g. SLD/SRD resolving causes the cache to be updated as opposed to always fetching a fresh value).

I can file a bug later.
There's a spec bug filed: https://github.com/w3c/webrtc-pc/issues/1965

If we want to be totally consistent, it means that every state-altering synchronous call and every promise resolution has to install a whole state block (which can get to be pretty big - it's a lot more than the SDP descriptions).

Would make things cleaner, and would increase the blink/webrtc code dissonance.

TODO: Add failing test in wpt


Sign in to add a comment