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

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

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 4569798e6c7e3dc5d47ce379c0064d9a32290ba5..07216ff257cd2356c3eaec8a4a6e469499c6a0f6 100644
--- a/Source/modules/mediastream/RTCDataChannel.cpp
+++ b/Source/modules/mediastream/RTCDataChannel.cpp
@@ -48,7 +48,7 @@ PassRefPtr<RTCDataChannel> RTCDataChannel::create(ScriptExecutionContext* contex
{
OwnPtr<RTCDataChannelHandler> handler = peerConnectionHandler->createDataChannel(label, init);
if (!handler) {
- es.throwDOMException(NotSupportedError);
+ es.throwUninformativeAndGenericDOMException(NotSupportedError);
return 0;
}
return adoptRef(new RTCDataChannel(context, handler.release()));
@@ -147,29 +147,29 @@ String RTCDataChannel::binaryType() const
void RTCDataChannel::setBinaryType(const String& binaryType, ExceptionState& es)
{
if (binaryType == "blob")
- es.throwDOMException(NotSupportedError);
+ es.throwUninformativeAndGenericDOMException(NotSupportedError);
else if (binaryType == "arraybuffer")
m_binaryType = BinaryTypeArrayBuffer;
else
- es.throwDOMException(TypeMismatchError);
+ es.throwUninformativeAndGenericDOMException(TypeMismatchError);
}
void RTCDataChannel::send(const String& data, ExceptionState& es)
{
if (m_readyState != ReadyStateOpen) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
if (!m_handler->sendStringData(data)) {
// FIXME: Decide what the right exception here is.
- es.throwDOMException(SyntaxError);
+ es.throwUninformativeAndGenericDOMException(SyntaxError);
}
}
void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& es)
{
if (m_readyState != ReadyStateOpen) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
@@ -183,7 +183,7 @@ void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& es)
if (!m_handler->sendRawData(dataPointer, dataLength)) {
// FIXME: Decide what the right exception here is.
- es.throwDOMException(SyntaxError);
+ es.throwUninformativeAndGenericDOMException(SyntaxError);
}
}
@@ -196,7 +196,7 @@ void RTCDataChannel::send(PassRefPtr<ArrayBufferView> data, ExceptionState& es)
void RTCDataChannel::send(PassRefPtr<Blob> data, ExceptionState& es)
{
// FIXME: implement
- es.throwDOMException(NotSupportedError);
+ es.throwUninformativeAndGenericDOMException(NotSupportedError);
}
void RTCDataChannel::close()
« 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