| Index: Source/modules/mediastream/RTCDataChannel.cpp
|
| diff --git a/Source/modules/mediastream/RTCDataChannel.cpp b/Source/modules/mediastream/RTCDataChannel.cpp
|
| index e1d3f5553c3e22635081a188c2e7da038687002f..5733ccb2024175603f25e392fb83b16cb0231d20 100644
|
| --- a/Source/modules/mediastream/RTCDataChannel.cpp
|
| +++ b/Source/modules/mediastream/RTCDataChannel.cpp
|
| @@ -39,19 +39,19 @@
|
|
|
| namespace WebCore {
|
|
|
| -static void throwNotOpenException(ExceptionState& es)
|
| +static void throwNotOpenException(ExceptionState& exceptionState)
|
| {
|
| - es.throwDOMException(InvalidStateError, "RTCDataChannel.readyState is not 'open'");
|
| + exceptionState.throwDOMException(InvalidStateError, "RTCDataChannel.readyState is not 'open'");
|
| }
|
|
|
| -static void throwCouldNotSendDataException(ExceptionState& es)
|
| +static void throwCouldNotSendDataException(ExceptionState& exceptionState)
|
| {
|
| - es.throwDOMException(NetworkError, "Could not send data");
|
| + exceptionState.throwDOMException(NetworkError, "Could not send data");
|
| }
|
|
|
| -static void throwNoBlobSupportException(ExceptionState& es)
|
| +static void throwNoBlobSupportException(ExceptionState& exceptionState)
|
| {
|
| - es.throwDOMException(NotSupportedError, ExceptionMessages::failedToExecute("send", "RTCDataChannel", "Blob support not implemented yet"));
|
| + exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::failedToExecute("send", "RTCDataChannel", "Blob support not implemented yet"));
|
| }
|
|
|
| PassRefPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, PassOwnPtr<RTCDataChannelHandler> handler)
|
| @@ -60,11 +60,11 @@ PassRefPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, Pas
|
| return adoptRef(new RTCDataChannel(context, handler));
|
| }
|
|
|
| -PassRefPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, RTCPeerConnectionHandler* peerConnectionHandler, const String& label, const blink::WebRTCDataChannelInit& init, ExceptionState& es)
|
| +PassRefPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, RTCPeerConnectionHandler* peerConnectionHandler, const String& label, const blink::WebRTCDataChannelInit& init, ExceptionState& exceptionState)
|
| {
|
| OwnPtr<RTCDataChannelHandler> handler = peerConnectionHandler->createDataChannel(label, init);
|
| if (!handler) {
|
| - es.throwDOMException(NotSupportedError, "RTCDataChannel is not supported");
|
| + exceptionState.throwDOMException(NotSupportedError, "RTCDataChannel is not supported");
|
| return 0;
|
| }
|
| return adoptRef(new RTCDataChannel(context, handler.release()));
|
| @@ -160,32 +160,32 @@ String RTCDataChannel::binaryType() const
|
| return String();
|
| }
|
|
|
| -void RTCDataChannel::setBinaryType(const String& binaryType, ExceptionState& es)
|
| +void RTCDataChannel::setBinaryType(const String& binaryType, ExceptionState& exceptionState)
|
| {
|
| if (binaryType == "blob")
|
| - throwNoBlobSupportException(es);
|
| + throwNoBlobSupportException(exceptionState);
|
| else if (binaryType == "arraybuffer")
|
| m_binaryType = BinaryTypeArrayBuffer;
|
| else
|
| - es.throwDOMException(TypeMismatchError, "Unknown binary type : " + binaryType);
|
| + exceptionState.throwDOMException(TypeMismatchError, "Unknown binary type : " + binaryType);
|
| }
|
|
|
| -void RTCDataChannel::send(const String& data, ExceptionState& es)
|
| +void RTCDataChannel::send(const String& data, ExceptionState& exceptionState)
|
| {
|
| if (m_readyState != ReadyStateOpen) {
|
| - throwNotOpenException(es);
|
| + throwNotOpenException(exceptionState);
|
| return;
|
| }
|
| if (!m_handler->sendStringData(data)) {
|
| // FIXME: This should not throw an exception but instead forcefully close the data channel.
|
| - throwCouldNotSendDataException(es);
|
| + throwCouldNotSendDataException(exceptionState);
|
| }
|
| }
|
|
|
| -void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& es)
|
| +void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& exceptionState)
|
| {
|
| if (m_readyState != ReadyStateOpen) {
|
| - throwNotOpenException(es);
|
| + throwNotOpenException(exceptionState);
|
| return;
|
| }
|
|
|
| @@ -199,20 +199,20 @@ void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& es)
|
|
|
| if (!m_handler->sendRawData(dataPointer, dataLength)) {
|
| // FIXME: This should not throw an exception but instead forcefully close the data channel.
|
| - throwCouldNotSendDataException(es);
|
| + throwCouldNotSendDataException(exceptionState);
|
| }
|
| }
|
|
|
| -void RTCDataChannel::send(PassRefPtr<ArrayBufferView> data, ExceptionState& es)
|
| +void RTCDataChannel::send(PassRefPtr<ArrayBufferView> data, ExceptionState& exceptionState)
|
| {
|
| RefPtr<ArrayBuffer> arrayBuffer(data->buffer());
|
| - send(arrayBuffer.release(), es);
|
| + send(arrayBuffer.release(), exceptionState);
|
| }
|
|
|
| -void RTCDataChannel::send(PassRefPtr<Blob> data, ExceptionState& es)
|
| +void RTCDataChannel::send(PassRefPtr<Blob> data, ExceptionState& exceptionState)
|
| {
|
| // FIXME: implement
|
| - throwNoBlobSupportException(es);
|
| + throwNoBlobSupportException(exceptionState);
|
| }
|
|
|
| void RTCDataChannel::close()
|
|
|