Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (238181 => 238182)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-11-14 17:53:21 UTC (rev 238182)
@@ -1,5 +1,16 @@
2018-11-14 Youenn Fablet <[email protected]>
+ Convert libwebrtc error types to DOM exceptions
+ https://bugs.webkit.org/show_bug.cgi?id=191590
+
+ Reviewed by Alex Christensen.
+
+ * 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:
+
+2018-11-14 Youenn Fablet <[email protected]>
+
Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
https://bugs.webkit.org/show_bug.cgi?id=191603
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt (238181 => 238182)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCConfiguration-rtcpMuxPolicy-expected.txt 2018-11-14 17:53:21 UTC (rev 238182)
@@ -10,6 +10,6 @@
PASS setConfiguration({ rtcpMuxPolicy: 'negotiate' }) with initial rtcpMuxPolicy require should throw InvalidModificationError
PASS setConfiguration({ rtcpMuxPolicy: 'require' }) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError
PASS setConfiguration({}) with initial rtcpMuxPolicy negotiate should throw InvalidModificationError
-FAIL setRemoteDescription throws InvalidAccessError when called with an offer without rtcp-mux and rtcpMuxPolicy is set to require assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set remote offer sdp: The m= section:audio1 is invalid. RTCP-MUX is not enabled when it is required." that is not a DOMException InvalidAccessError: property "code" is equal to 0, expected 15
-FAIL setRemoteDescription throws InvalidAccessError when called with an answer without rtcp-mux and rtcpMuxPolicy is set to require assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer. Rejecting answer." that is not a DOMException InvalidAccessError: property "code" is equal to 0, expected 15
+PASS setRemoteDescription throws InvalidAccessError when called with an offer without rtcp-mux and rtcpMuxPolicy is set to require
+PASS setRemoteDescription throws InvalidAccessError when called with an answer without rtcp-mux and rtcpMuxPolicy is set to require
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt (238181 => 238182)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt 2018-11-14 17:53:21 UTC (rev 238182)
@@ -1,7 +1,7 @@
PASS setLocalDescription() with valid answer should succeed
FAIL setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v="
-FAIL setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to apply the description for 0: Local fingerprint does not match identity. Expected: sha-256 12:E5:12:50:9C:09:A8:71:EF:5F:AF:F6:4C:08:7A:BF:0C:44:2D:A8:96:5C:34:3A:64:12:70:D2:51:60:2E:79 Got: sha-256 A5:C7:8C:82:7E:30:00:63:86:E5:AA:93:65:C2:60:83:49:01:E0:35:0F:91:F2:7A:C3:7B:AF:8F:52:3E:12:87" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
+FAIL setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError assert_throws: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to apply the description for 0: Local fingerprint does not match identity. Expected: sha-256 FD:12:D4:3F:20:8C:37:A8:9A:C0:CB:03:84:DF:97:20:40:24:C8:DB:B8:88:6C:8D:99:B6:25:48:5C:29:1E:0B Got: sha-256 CC:EB:A3:0C:D3:6C:7C:66:8B:E2:C8:A7:7B:00:92:56:A6:C8:C9:3E:D8:B9:CB:D0:5A:C9:7F:AE:10:4E:C7:CA" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
PASS Calling setLocalDescription(answer) from stable state should reject with InvalidStateError
PASS Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt (238181 => 238182)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt 2018-11-14 17:53:21 UTC (rev 238182)
@@ -8,7 +8,7 @@
PASS checkAddTransceiverWithSetRemoteOfferSending
PASS checkAddTransceiverWithSetRemoteOfferNoSend
PASS checkAddTransceiverBadKind
-FAIL checkNoMidOffer promise_test: Unhandled rejection with value: object "OperationError: Failed to set remote offer sdp: The BUNDLE group contains MID:0 matching no m= section."
+FAIL checkNoMidOffer promise_test: Unhandled rejection with value: object "InvalidAccessError: Failed to set remote offer sdp: The BUNDLE group contains MID:0 matching no m= section."
PASS checkSetDirection
PASS checkCurrentDirection
PASS checkSendrecvWithNoSendTrack
Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (238181 => 238182)
--- trunk/Source/ThirdParty/libwebrtc/ChangeLog 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2018-11-14 17:53:21 UTC (rev 238182)
@@ -1,5 +1,16 @@
2018-11-14 Youenn Fablet <[email protected]>
+ Convert libwebrtc error types to DOM exceptions
+ https://bugs.webkit.org/show_bug.cgi?id=191590
+
+ Reviewed by Alex Christensen.
+
+ * Configurations/libwebrtc.iOS.exp:
+ * Configurations/libwebrtc.iOSsim.exp:
+ * Configurations/libwebrtc.mac.exp:
+
+2018-11-14 Youenn Fablet <[email protected]>
+
Add support for transport and peerConnection stats
https://bugs.webkit.org/show_bug.cgi?id=191592
Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp (238181 => 238182)
--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp 2018-11-14 17:53:21 UTC (rev 238182)
@@ -129,8 +129,6 @@
__ZNK3rtc17ThreadCheckerImpl19CalledOnValidThreadEv
__ZN7cricket18BasicPortAllocatorC1EPN3rtc14NetworkManagerEPNS1_19PacketSocketFactoryEPN6webrtc14TurnCustomizerEPNS_25RelayPortFactoryInterfaceE
__ZN7cricket12AudioOptionsD1Ev
-__ZN6webrtc32CreateSessionDescriptionObserver9OnFailureENS_8RTCErrorE
-__ZN6webrtc29SetSessionDescriptionObserver9OnFailureENS_8RTCErrorE
__ZN6webrtc28RtpHeaderExtensionCapabilityD1Ev
__ZN6webrtc26PeerConnectionDependenciesD1Ev
__ZN3rtc24BasicPacketSocketFactory21CreateClientTcpSocketERKNS_13SocketAddressES3_RKNS_9ProxyInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERKNS_22PacketSocketTcpOptionsE
@@ -233,3 +231,5 @@
__ZN3rtc14RTCCertificate7FromPEMERKNS_17RTCCertificatePEME
__ZN6webrtc26PeerConnectionDependenciesC1EPNS_22PeerConnectionObserverE
__ZN6webrtc30PeerConnectionFactoryInterface20CreatePeerConnectionERKNS_23PeerConnectionInterface16RTCConfigurationENSt3__110unique_ptrIN7cricket13PortAllocatorENS5_14default_deleteIS8_EEEENS6_IN3rtc32RTCCertificateGeneratorInterfaceENS9_ISD_EEEEPNS_22PeerConnectionObserverE
+__ZN6webrtc29SetSessionDescriptionObserver9OnFailureERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
+__ZN6webrtc32CreateSessionDescriptionObserver9OnFailureERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp (238181 => 238182)
--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp 2018-11-14 17:53:21 UTC (rev 238182)
@@ -129,8 +129,6 @@
__ZNK3rtc17ThreadCheckerImpl19CalledOnValidThreadEv
__ZN7cricket18BasicPortAllocatorC1EPN3rtc14NetworkManagerEPNS1_19PacketSocketFactoryEPN6webrtc14TurnCustomizerEPNS_25RelayPortFactoryInterfaceE
__ZN7cricket12AudioOptionsD1Ev
-__ZN6webrtc32CreateSessionDescriptionObserver9OnFailureENS_8RTCErrorE
-__ZN6webrtc29SetSessionDescriptionObserver9OnFailureENS_8RTCErrorE
__ZN6webrtc28RtpHeaderExtensionCapabilityD1Ev
__ZN6webrtc26PeerConnectionDependenciesD1Ev
__ZN3rtc24BasicPacketSocketFactory21CreateClientTcpSocketERKNS_13SocketAddressES3_RKNS_9ProxyInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERKNS_22PacketSocketTcpOptionsE
@@ -234,3 +232,5 @@
__ZN3rtc14RTCCertificate7FromPEMERKNS_17RTCCertificatePEME
__ZN6webrtc26PeerConnectionDependenciesC1EPNS_22PeerConnectionObserverE
__ZN6webrtc30PeerConnectionFactoryInterface20CreatePeerConnectionERKNS_23PeerConnectionInterface16RTCConfigurationENSt3__110unique_ptrIN7cricket13PortAllocatorENS5_14default_deleteIS8_EEEENS6_IN3rtc32RTCCertificateGeneratorInterfaceENS9_ISD_EEEEPNS_22PeerConnectionObserverE
+__ZN6webrtc29SetSessionDescriptionObserver9OnFailureERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
+__ZN6webrtc32CreateSessionDescriptionObserver9OnFailureERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp (238181 => 238182)
--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp 2018-11-14 17:53:21 UTC (rev 238182)
@@ -129,8 +129,6 @@
__ZNK3rtc17ThreadCheckerImpl19CalledOnValidThreadEv
__ZN7cricket18BasicPortAllocatorC1EPN3rtc14NetworkManagerEPNS1_19PacketSocketFactoryEPN6webrtc14TurnCustomizerEPNS_25RelayPortFactoryInterfaceE
__ZN7cricket12AudioOptionsD1Ev
-__ZN6webrtc32CreateSessionDescriptionObserver9OnFailureENS_8RTCErrorE
-__ZN6webrtc29SetSessionDescriptionObserver9OnFailureENS_8RTCErrorE
__ZN6webrtc28RtpHeaderExtensionCapabilityD1Ev
__ZN6webrtc26PeerConnectionDependenciesD1Ev
__ZN3rtc24BasicPacketSocketFactory21CreateClientTcpSocketERKNS_13SocketAddressES3_RKNS_9ProxyInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERKNS_22PacketSocketTcpOptionsE
@@ -234,3 +232,5 @@
__ZN3rtc14RTCCertificate7FromPEMERKNS_17RTCCertificatePEME
__ZN6webrtc26PeerConnectionDependenciesC1EPNS_22PeerConnectionObserverE
__ZN6webrtc30PeerConnectionFactoryInterface20CreatePeerConnectionERKNS_23PeerConnectionInterface16RTCConfigurationENSt3__110unique_ptrIN7cricket13PortAllocatorENS5_14default_deleteIS8_EEEENS6_IN3rtc32RTCCertificateGeneratorInterfaceENS9_ISD_EEEEPNS_22PeerConnectionObserverE
+__ZN6webrtc29SetSessionDescriptionObserver9OnFailureERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
+__ZN6webrtc32CreateSessionDescriptionObserver9OnFailureERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
Modified: trunk/Source/WebCore/ChangeLog (238181 => 238182)
--- trunk/Source/WebCore/ChangeLog 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/WebCore/ChangeLog 2018-11-14 17:53:21 UTC (rev 238182)
@@ -1,5 +1,25 @@
2018-11-14 Youenn Fablet <[email protected]>
+ Convert libwebrtc error types to DOM exceptions
+ https://bugs.webkit.org/show_bug.cgi?id=191590
+
+ Reviewed by Alex Christensen.
+
+ 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):
+
+2018-11-14 Youenn Fablet <[email protected]>
+
Allow to remove MediaStreamPrivate observers when iterating over observers
https://bugs.webkit.org/show_bug.cgi?id=187256
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (238181 => 238182)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2018-11-14 17:53:21 UTC (rev 238182)
@@ -193,7 +193,7 @@
webrtc::SdpParseError error;
std::unique_ptr<webrtc::SessionDescriptionInterface> sessionDescription(webrtc::CreateSessionDescription(sessionDescriptionType(description.type()), description.sdp().utf8().data(), &error));
if (!sessionDescription) {
- m_peerConnectionBackend.setRemoteDescriptionFailed(Exception { OperationError, fromStdString(error.description) });
+ m_peerConnectionBackend.setRemoteDescriptionFailed(Exception { SyntaxError, fromStdString(error.description) });
return;
}
m_backend->SetRemoteDescription(&m_setRemoteSessionDescriptionObserver, sessionDescription.release());
@@ -772,15 +772,15 @@
});
}
-void LibWebRTCMediaEndpoint::createSessionDescriptionFailed(const std::string& errorMessage)
+void LibWebRTCMediaEndpoint::createSessionDescriptionFailed(ExceptionCode errorCode, const char* errorMessage)
{
- callOnMainThread([protectedThis = makeRef(*this), error = fromStdString(errorMessage)] () mutable {
+ callOnMainThread([protectedThis = makeRef(*this), errorCode, errorMessage = String(errorMessage)] () mutable {
if (protectedThis->isStopped())
return;
if (protectedThis->m_isInitiator)
- protectedThis->m_peerConnectionBackend.createOfferFailed(Exception { OperationError, WTFMove(error) });
+ protectedThis->m_peerConnectionBackend.createOfferFailed(Exception { errorCode, WTFMove(errorMessage) });
else
- protectedThis->m_peerConnectionBackend.createAnswerFailed(Exception { OperationError, WTFMove(error) });
+ protectedThis->m_peerConnectionBackend.createAnswerFailed(Exception { errorCode, WTFMove(errorMessage) });
});
}
@@ -793,12 +793,12 @@
});
}
-void LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed(const std::string& errorMessage)
+void LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed(ExceptionCode errorCode, const char* errorMessage)
{
- callOnMainThread([protectedThis = makeRef(*this), error = fromStdString(errorMessage)] () mutable {
+ callOnMainThread([protectedThis = makeRef(*this), errorCode, errorMessage = String(errorMessage)] () mutable {
if (protectedThis->isStopped())
return;
- protectedThis->m_peerConnectionBackend.setLocalDescriptionFailed(Exception { OperationError, WTFMove(error) });
+ protectedThis->m_peerConnectionBackend.setLocalDescriptionFailed(Exception { errorCode, WTFMove(errorMessage) });
});
}
@@ -811,12 +811,12 @@
});
}
-void LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed(const std::string& errorMessage)
+void LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed(ExceptionCode errorCode, const char* errorMessage)
{
- callOnMainThread([protectedThis = makeRef(*this), error = fromStdString(errorMessage)] () mutable {
+ callOnMainThread([protectedThis = makeRef(*this), errorCode, errorMessage = String(errorMessage)] () mutable {
if (protectedThis->isStopped())
return;
- protectedThis->m_peerConnectionBackend.setRemoteDescriptionFailed(Exception { OperationError, WTFMove(error) });
+ protectedThis->m_peerConnectionBackend.setRemoteDescriptionFailed(Exception { errorCode, WTFMove(errorMessage) });
});
}
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (238181 => 238182)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2018-11-14 17:53:21 UTC (rev 238182)
@@ -132,11 +132,11 @@
void OnIceCandidatesRemoved(const std::vector<cricket::Candidate>&) final;
void createSessionDescriptionSucceeded(std::unique_ptr<webrtc::SessionDescriptionInterface>&&);
- void createSessionDescriptionFailed(const std::string&);
+ void createSessionDescriptionFailed(ExceptionCode, const char*);
void setLocalSessionDescriptionSucceeded();
- void setLocalSessionDescriptionFailed(const std::string&);
+ void setLocalSessionDescriptionFailed(ExceptionCode, const char*);
void setRemoteSessionDescriptionSucceeded();
- void setRemoteSessionDescriptionFailed(const std::string&);
+ void setRemoteSessionDescriptionFailed(ExceptionCode, const char*);
void addRemoteStream(webrtc::MediaStreamInterface&);
void addRemoteTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>&&, const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>&);
void removeRemoteStream(webrtc::MediaStreamInterface&);
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h (238181 => 238182)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h 2018-11-14 17:50:36 UTC (rev 238181)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCObservers.h 2018-11-14 17:53:21 UTC (rev 238182)
@@ -26,6 +26,7 @@
#if USE(LIBWEBRTC)
+#include "ExceptionCode.h"
#include "LibWebRTCMacros.h"
ALLOW_UNUSED_PARAMETERS_BEGIN
@@ -36,6 +37,26 @@
namespace WebCore {
+static inline ExceptionCode toExceptionCode(webrtc::RTCErrorType type)
+{
+ switch (type) {
+ case webrtc::RTCErrorType::INVALID_PARAMETER:
+ return InvalidAccessError;
+ case webrtc::RTCErrorType::INVALID_RANGE:
+ return RangeError;
+ case webrtc::RTCErrorType::SYNTAX_ERROR:
+ return SyntaxError;
+ case webrtc::RTCErrorType::INVALID_STATE:
+ return InvalidStateError;
+ case webrtc::RTCErrorType::INVALID_MODIFICATION:
+ return InvalidModificationError;
+ case webrtc::RTCErrorType::NETWORK_ERROR:
+ return NetworkError;
+ default:
+ return OperationError;
+ }
+}
+
template<typename Endpoint>
class CreateSessionDescriptionObserver final : public webrtc::CreateSessionDescriptionObserver {
public:
@@ -45,7 +66,7 @@
}
void OnSuccess(webrtc::SessionDescriptionInterface* sessionDescription) final { m_endpoint.createSessionDescriptionSucceeded(std::unique_ptr<webrtc::SessionDescriptionInterface>(sessionDescription)); }
- void OnFailure(const std::string& error) final { m_endpoint.createSessionDescriptionFailed(error); }
+ void OnFailure(webrtc::RTCError error) final { m_endpoint.createSessionDescriptionFailed(toExceptionCode(error.type()), error.message()); }
void AddRef() const { m_endpoint.AddRef(); }
rtc::RefCountReleaseStatus Release() const { return m_endpoint.Release(); }
@@ -63,7 +84,7 @@
}
void OnSuccess() final { m_endpoint.setLocalSessionDescriptionSucceeded(); }
- void OnFailure(const std::string& error) final { m_endpoint.setLocalSessionDescriptionFailed(error); }
+ void OnFailure(webrtc::RTCError error) final { m_endpoint.setLocalSessionDescriptionFailed(toExceptionCode(error.type()), error.message()); }
void AddRef() const { m_endpoint.AddRef(); }
rtc::RefCountReleaseStatus Release() const { return m_endpoint.Release(); }
@@ -81,7 +102,7 @@
}
void OnSuccess() final { m_endpoint.setRemoteSessionDescriptionSucceeded(); }
- void OnFailure(const std::string& error) final { m_endpoint.setRemoteSessionDescriptionFailed(error); }
+ void OnFailure(webrtc::RTCError error) final { m_endpoint.setRemoteSessionDescriptionFailed(toExceptionCode(error.type()), error.message()); }
void AddRef() const { m_endpoint.AddRef(); }
rtc::RefCountReleaseStatus Release() const { return m_endpoint.Release(); }