New issue
Advanced search Search tips

Issue 750512 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 18
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug



Sign in to add a comment

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
 
Labels: TE-NeedsTriageHelp
Adding "TE-NeedsTriageHelp" as the issue related to RTCPeerConnection API.

Thanks,

Comment 2 by guidou@chromium.org, Jul 31 2017

Components: -Blink>WebRTC Blink>WebRTC>PeerConnection
Owner: guidou@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 3 by guidou@chromium.org, Mar 14 2018

Owner: hbos@chromium.org

Comment 4 by hbos@chromium.org, Mar 14 2018

Labels: -Pri-2 Pri-3
Any update on this? It still needs hacks to detemine whether localDescription or localDescription are set already.
Labels: -Pri-3 M-70 OS-Android OS-Chrome OS-Fuchsia OS-Mac OS-Windows Pri-2
NextAction: 2018-08-08
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.
The NextAction date has arrived: 2018-08-08
NextAction: ----
Status: Started (was: Assigned)
Taking a stap
Project Member

Comment 10 by bugdroid1@chromium.org, 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

Status: Verified (was: Started)

Sign in to add a comment