| Index: Source/modules/mediastream/RTCDataChannel.cpp
|
| diff --git a/Source/modules/mediastream/RTCDataChannel.cpp b/Source/modules/mediastream/RTCDataChannel.cpp
|
| index 77a38d88b7b428987ea0f26dce320a086b9a11e5..8a5c4f322fb95070ab71f0b97cae7a3235d694b8 100644
|
| --- a/Source/modules/mediastream/RTCDataChannel.cpp
|
| +++ b/Source/modules/mediastream/RTCDataChannel.cpp
|
| @@ -26,14 +26,14 @@
|
| #include "modules/mediastream/RTCDataChannel.h"
|
|
|
| #include "bindings/core/v8/ExceptionState.h"
|
| +#include "core/dom/DOMArrayBuffer.h"
|
| +#include "core/dom/DOMArrayBufferView.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/events/MessageEvent.h"
|
| #include "core/fileapi/Blob.h"
|
| #include "modules/mediastream/RTCPeerConnection.h"
|
| #include "public/platform/WebRTCPeerConnectionHandler.h"
|
| -#include "wtf/ArrayBuffer.h"
|
| -#include "wtf/ArrayBufferView.h"
|
|
|
| namespace blink {
|
|
|
| @@ -185,14 +185,14 @@ void RTCDataChannel::send(const String& data, ExceptionState& exceptionState)
|
| }
|
| }
|
|
|
| -void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& exceptionState)
|
| +void RTCDataChannel::send(PassRefPtr<DOMArrayBuffer> prpData, ExceptionState& exceptionState)
|
| {
|
| if (m_readyState != ReadyStateOpen) {
|
| throwNotOpenException(exceptionState);
|
| return;
|
| }
|
|
|
| - RefPtr<ArrayBuffer> data = prpData;
|
| + RefPtr<DOMArrayBuffer> data = prpData;
|
|
|
| size_t dataLength = data->byteLength();
|
| if (!dataLength)
|
| @@ -204,7 +204,7 @@ void RTCDataChannel::send(PassRefPtr<ArrayBuffer> prpData, ExceptionState& excep
|
| }
|
| }
|
|
|
| -void RTCDataChannel::send(PassRefPtr<ArrayBufferView> data, ExceptionState& exceptionState)
|
| +void RTCDataChannel::send(PassRefPtr<DOMArrayBufferView> data, ExceptionState& exceptionState)
|
| {
|
| if (!m_handler->sendRawData(static_cast<const char*>(data->baseAddress()), data->byteLength())) {
|
| // FIXME: This should not throw an exception but instead forcefully close the data channel.
|
| @@ -263,7 +263,7 @@ void RTCDataChannel::didReceiveRawData(const char* data, size_t dataLength)
|
| return;
|
| }
|
| if (m_binaryType == BinaryTypeArrayBuffer) {
|
| - RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(data, dataLength);
|
| + RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::create(data, dataLength);
|
| scheduleDispatchEvent(MessageEvent::create(buffer.release()));
|
| return;
|
| }
|
|
|