Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1693)

Unified Diff: Source/modules/mediastream/RTCPeerConnection.cpp

Issue 235123002: Should throw TypeError instead of TypeMismatchError (modules) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/mediastream/RTCPeerConnection.cpp
diff --git a/Source/modules/mediastream/RTCPeerConnection.cpp b/Source/modules/mediastream/RTCPeerConnection.cpp
index b359c31b0e3f25ab0cc9dbecf37c08b9becf42df..1b9f50539a85709b3cd1983c34c7e512801f06f1 100644
--- a/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -248,7 +248,7 @@ void RTCPeerConnection::setLocalDescription(PassRefPtr<RTCSessionDescription> pr
RefPtr<RTCSessionDescription> sessionDescription = prpSessionDescription;
if (!sessionDescription) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCSessionDescription"));
+ exceptionState.throwDOMException(TypeError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCSessionDescription"));
return;
}
@@ -273,7 +273,7 @@ void RTCPeerConnection::setRemoteDescription(PassRefPtr<RTCSessionDescription> p
RefPtr<RTCSessionDescription> sessionDescription = prpSessionDescription;
if (!sessionDescription) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCSessionDescription"));
+ exceptionState.throwDOMException(TypeError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCSessionDescription"));
return;
}
@@ -315,7 +315,7 @@ void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, Exception
return;
if (!iceCandidate) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCIceCandidate"));
+ exceptionState.throwDOMException(TypeError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCIceCandidate"));
return;
}
@@ -330,7 +330,7 @@ void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, PassOwnPt
return;
if (!iceCandidate) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCIceCandidate"));
+ exceptionState.throwDOMException(TypeError, ExceptionMessages::argumentNullOrIncorrectType(1, "RTCIceCandidate"));
return;
}
ASSERT(successCallback);
@@ -409,7 +409,7 @@ void RTCPeerConnection::addStream(PassRefPtr<MediaStream> prpStream, const Dicti
RefPtr<MediaStream> stream = prpStream;
if (!stream) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "MediaStream"));
+ exceptionState.throwDOMException(TypeError, ExceptionMessages::argumentNullOrIncorrectType(1, "MediaStream"));
return;
}
@@ -433,7 +433,7 @@ void RTCPeerConnection::removeStream(PassRefPtr<MediaStream> prpStream, Exceptio
return;
if (!prpStream) {
- exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::argumentNullOrIncorrectType(1, "MediaStream"));
+ exceptionState.throwDOMException(TypeError, ExceptionMessages::argumentNullOrIncorrectType(1, "MediaStream"));
return;
}
« no previous file with comments | « Source/modules/mediastream/RTCIceCandidate.cpp ('k') | Source/modules/mediastream/RTCSessionDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698