| 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 0e627f0d90ee1c221789aed757dc78dab2b732ab..79f35a22693a050135726de006be5a2fbaca6f97 100644
|
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| @@ -319,6 +319,13 @@ WebRTCConfiguration parseConfiguration(ExecutionContext* context,
|
| "'stun', 'turn' or 'turns'.");
|
| return WebRTCConfiguration();
|
| }
|
| + if ((url.protocolIs("turn") || url.protocolIs("turns")) &&
|
| + (username.isNull() || credential.isNull())) {
|
| + exceptionState.throwDOMException(InvalidAccessError,
|
| + "Both username and credential are "
|
| + "required when the URL scheme is "
|
| + "\"turn\" or \"turns\".");
|
| + }
|
| iceServers.append(WebRTCIceServer{url, username, credential});
|
| }
|
| }
|
|
|