PeerConnection should have its connectionState closed even if doing gathering
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2018 15:18:34 +0000 (15:18 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2018 15:18:34 +0000 (15:18 +0000)
commit8010ac81c1ce74e28796c37aaef59d5fa1d29136
treeda0b26c6327d8109c30f9b182698db289998c943
parent4013cd9db04dccd7af106dab047a99327b75e11b
PeerConnection should have its connectionState closed even if doing gathering
https://bugs.webkit.org/show_bug.cgi?id=185267

Reviewed by Darin Adler.

Source/WebCore:

Test: webrtc/addICECandidate-closed.html

In case m_iceConnectionState is closed, m_connectionState should also be set to closed
and RTCPeerConnection should be closed so as to reject any other call.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::updateConnectionState):

LayoutTests:

* webrtc/addICECandidate-closed-expected.txt: Added.
* webrtc/addICECandidate-closed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webrtc/addICECandidate-closed-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/addICECandidate-closed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp