Convert libwebrtc error types to DOM exceptions
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2018 17:53:21 +0000 (17:53 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2018 17:53:21 +0000 (17:53 +0000)
commit553d0aa7eb1ca1c5fafcd78008fca081ce054469
tree497f436a8d594889c1595c1760bdef50711689cc
parent2a69597cae3c2e908b8d465e6312c14d01bf100c
Convert libwebrtc error types to DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=191590

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt:
* web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt:

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:

Source/WebCore:

Make use of overloaded callback method that provides an error type.
This type is then used to create a DOM exception with the correct type.
Covered by existing tests.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::doSetRemoteDescription):
(WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
(WebCore::toExceptionCode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h