Newly constructed RTCPeerConnection object has non-null localDescription and remoteDescription properties
Reported by
cwaltonm...@gmail.com,
Jul 30 2017
|
|||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
Steps to reproduce the problem:
1. var newConnection = new RTCPeerConnection();
2. if (newConnection.localDescription || newConnection.remoteDescription) { alert("this is a bug - both localDescription and remoteDescription should be null until explicitly set!"); }
3. // Check API: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/localDescription and https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/remoteDescription
What is the expected behavior?
Both of these properties should be null until explicitly set via setLocalDescription and setRemoteDescription methods
What went wrong?
Immediately after object creation, these two properties should be null, but they are not. Instead they are empty RTCSessionDescription objects.
This means that you can no longer rely on their nullness to indicate whether their associated setter methods have been called yet.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 60.0.3112.78 Channel: stable
OS Version:
Flash Version:
This works correctly on Firefox
,
Jul 31 2017
,
Mar 14 2018
,
Mar 14 2018
,
Aug 6
Any update on this? It still needs hacks to detemine whether localDescription or localDescription are set already.
,
Aug 6
Hi, so many bugs to little time. This has not been looked into, but I just looked, and it looks like it would be very easy to fix this: https://cs.chromium.org/chromium/src/content/renderer/media/webrtc/rtc_peer_connection_handler.cc?sq=package:chromium&dr=C&g=0&l=1410 Vacation time is upon us though, but if I have time I'll take a look on wednesday.
,
Aug 8
The NextAction date has arrived: 2018-08-08
,
Aug 8
Taking a stap
,
Aug 8
Fix under review: https://chromium-review.googlesource.com/c/chromium/src/+/1167055
,
Aug 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dadc08bfbcd3fc4f24a58fdeb888f3aea3b34e6f commit dadc08bfbcd3fc4f24a58fdeb888f3aea3b34e6f Author: Henrik Boström <hbos@chromium.org> Date: Wed Aug 08 19:51:08 2018 RTCPeerConnection.[local/remote]Description: Allow null value. Due to a bug ( https://crbug.com/750512 ) even if the lower layer returned null, a session description was surfaced from content to blink with default sdp and type "". With this CL, null is surfaced as a blink::WebRTCSessionDescription whose IsNull() returns true. blink::RTCPeerConnection already correctly handles this case and returns null for localDescription and remoteDescription. WPT expectations updated accordingly. Bug: 750512 Change-Id: I51737f55165e767a5a1d1e9c519af9a535b5de70 Reviewed-on: https://chromium-review.googlesource.com/1167055 Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by: Florent Castelli <orphis@chromium.org> Cr-Commit-Position: refs/heads/master@{#581667} [modify] https://crrev.com/dadc08bfbcd3fc4f24a58fdeb888f3aea3b34e6f/content/renderer/media/webrtc/rtc_peer_connection_handler.cc [modify] https://crrev.com/dadc08bfbcd3fc4f24a58fdeb888f3aea3b34e6f/content/renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc [modify] https://crrev.com/dadc08bfbcd3fc4f24a58fdeb888f3aea3b34e6f/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-constructor-expected.txt
,
Aug 18
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by kavvaru@chromium.org
, Jul 31 2017