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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/modules/mediastream/RTCDTMFSender.cpp ('k') | Source/modules/mediastream/RTCIceCandidate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/RTCDataChannel.cpp
diff --git a/Source/modules/mediastream/RTCDataChannel.cpp b/Source/modules/mediastream/RTCDataChannel.cpp
index af131305f4c02e8f6c8e92b04a0740bcef04b08c..7192688c3de343ef5805b4171f4a6786ab64826a 100644
--- a/Source/modules/mediastream/RTCDataChannel.cpp
+++ b/Source/modules/mediastream/RTCDataChannel.cpp
@@ -121,25 +121,25 @@ void RTCDataChannel::setBinaryType(const String& binaryType, ExceptionCode& ec)
else if (binaryType == "arraybuffer")
m_binaryType = BinaryTypeArrayBuffer;
else
- ec = TYPE_MISMATCH_ERR;
+ ec = TypeMismatchError;
}
void RTCDataChannel::send(const String& data, ExceptionCode& ec)
{
if (m_readyState != ReadyStateOpen) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
if (!m_handler->sendStringData(data)) {
// FIXME: Decide what the right exception here is.
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
}
}
void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionCode& ec)
{
if (m_readyState != ReadyStateOpen) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
@@ -153,7 +153,7 @@ void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionCode& ec)
if (!m_handler->sendRawData(dataPointer, dataLength)) {
// FIXME: Decide what the right exception here is.
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
}
}
« no previous file with comments | « Source/modules/mediastream/RTCDTMFSender.cpp ('k') | Source/modules/mediastream/RTCIceCandidate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698