addIceCandidate should not throw if passed null or undefined
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Mar 2017 23:36:36 +0000 (23:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Mar 2017 23:36:36 +0000 (23:36 +0000)
commit71d3ce1e62d034faa028e20f8e3db6fe3544d985
treeada75ecbbed834b91a0b19ea07380e94bcd920a8
parent245f81e614e35671aaa90b54e496bc0fb89d22d2
addIceCandidate should not throw if passed null or undefined
https://bugs.webkit.org/show_bug.cgi?id=170118

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-27
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:

Source/WebCore:

Covered by updated test.

A null/undefined candidate passed to addIceCandidate means end of Ice candidate..

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::addIceCandidate):
* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::endOfIceCandidates):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCPeerConnection.js:
(addIceCandidate):

LayoutTests:

Updating test to log addIceCandidate rejection.

* webrtc/datachannel/basic.html:
* webrtc/routines.js:
(iceCallback1):
(iceCallback2):
(onAddIceCandidateError):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@214441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl.html
LayoutTests/webrtc/datachannel/basic.html
LayoutTests/webrtc/routines.js
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCPeerConnection.js