| Index: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| index 7163faa7fab29b637b137ec6ec815512d49b438e..60f82a93372be0f75d4a8c8faa672385561b27de 100644
|
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| @@ -86,6 +86,7 @@
|
| #include "public/platform/WebRTCConfiguration.h"
|
| #include "public/platform/WebRTCDataChannelHandler.h"
|
| #include "public/platform/WebRTCDataChannelInit.h"
|
| +#include "public/platform/WebRTCError.h"
|
| #include "public/platform/WebRTCICECandidate.h"
|
| #include "public/platform/WebRTCKeyParams.h"
|
| #include "public/platform/WebRTCOfferOptions.h"
|
| @@ -789,10 +790,10 @@ RTCSessionDescription* RTCPeerConnection::remoteDescription() {
|
| return RTCSessionDescription::create(webSessionDescription);
|
| }
|
|
|
| -void RTCPeerConnection::updateIce(ExecutionContext* context,
|
| - const RTCConfiguration& rtcConfiguration,
|
| - const Dictionary&,
|
| - ExceptionState& exceptionState) {
|
| +void RTCPeerConnection::setConfiguration(
|
| + ExecutionContext* context,
|
| + const RTCConfiguration& rtcConfiguration,
|
| + ExceptionState& exceptionState) {
|
| if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
|
| return;
|
|
|
| @@ -808,11 +809,20 @@ void RTCPeerConnection::updateIce(ExecutionContext* context,
|
| return;
|
| }
|
|
|
| - // TODO(deadbeef): When this changes to setConfiguration, call
|
| - // m_peerHandler->setConfiguration.
|
| - exceptionState.throwDOMException(
|
| - SyntaxError,
|
| - "Could not update the ICE Agent with the given configuration.");
|
| + WebRTCError error;
|
| + if (!m_peerHandler->setConfiguration(configuration, error)) {
|
| + // All errors besides InvalidModification should have been detected above.
|
| + if (error.type() == WebRTCErrorType::kInvalidModification) {
|
| + exceptionState.throwDOMException(
|
| + InvalidModificationError,
|
| + "Attempted to modify the PeerConnection's "
|
| + "configuration in an unsupported way.");
|
| + } else {
|
| + exceptionState.throwDOMException(
|
| + OperationError,
|
| + "Could not update the PeerConnection with the given configuration.");
|
| + }
|
| + }
|
| }
|
|
|
| ScriptPromise RTCPeerConnection::generateCertificate(
|
|
|