| 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 cec5ec646db74c233a3f9939e7f0c058b77d2a72..4ad8b8a126d72b905f7fb4946d1c4cad25e75fa1 100644
|
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| @@ -315,6 +315,13 @@ WebRTCConfiguration parseConfiguration(ExecutionContext* context,
|
| "\". URL scheme must be \"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});
|
| }
|
| }
|
|
|