Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
index 45d8b1a5d0c21dbb42149c53829b15c1fece91e7..d762b2f78306109828be9d315d068569c5a4ce57 100644 |
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
@@ -405,10 +405,7 @@ void RTCPeerConnection::setLocalDescription(RTCSessionDescription* sessionDescri |
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
return; |
- if (!sessionDescription) { |
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCSessionDescription")); |
- return; |
- } |
+ ASSERT(sessionDescription); |
RTCVoidRequest* request = RTCVoidRequestImpl::create(executionContext(), this, successCallback, errorCallback); |
m_peerHandler->setLocalDescription(request, sessionDescription->webSessionDescription()); |
@@ -428,10 +425,7 @@ void RTCPeerConnection::setRemoteDescription(RTCSessionDescription* sessionDescr |
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
return; |
- if (!sessionDescription) { |
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCSessionDescription")); |
- return; |
- } |
+ ASSERT(sessionDescription); |
RTCVoidRequest* request = RTCVoidRequestImpl::create(executionContext(), this, successCallback, errorCallback); |
m_peerHandler->setRemoteDescription(request, sessionDescription->webSessionDescription()); |
@@ -538,10 +532,7 @@ void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, Exception |
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
return; |
- if (!iceCandidate) { |
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCIceCandidate")); |
- return; |
- } |
+ ASSERT(iceCandidate); |
bool valid = m_peerHandler->addICECandidate(iceCandidate->webCandidate()); |
if (!valid) |
@@ -553,10 +544,7 @@ void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, VoidCallb |
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
return; |
- if (!iceCandidate) { |
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCIceCandidate")); |
- return; |
- } |
+ ASSERT(iceCandidate); |
ASSERT(successCallback); |
ASSERT(errorCallback); |
@@ -749,10 +737,7 @@ RTCDTMFSender* RTCPeerConnection::createDTMFSender(MediaStreamTrack* track, Exce |
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
return nullptr; |
- if (!track) { |
- exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrectType(1, "MediaStreamTrack")); |
- return nullptr; |
- } |
+ ASSERT(track); |
if (!hasLocalStreamWithTrackId(track->id())) { |
exceptionState.throwDOMException(SyntaxError, "No local stream is available for the track provided."); |