Index: third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp |
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp |
index e0101c9769e82c8047a95be27f8f2ad0e9bba938..b24931ac44f75fcc4abd5de9be6f6d1c4d7e98f1 100644 |
--- a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp |
+++ b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp |
@@ -195,15 +195,13 @@ void RTCDataChannel::send(const String& data, ExceptionState& exceptionState) |
} |
} |
-void RTCDataChannel::send(PassRefPtr<DOMArrayBuffer> prpData, ExceptionState& exceptionState) |
+void RTCDataChannel::send(DOMArrayBuffer* data, ExceptionState& exceptionState) |
{ |
if (m_readyState != ReadyStateOpen) { |
throwNotOpenException(exceptionState); |
return; |
} |
- RefPtr<DOMArrayBuffer> data = prpData; |
- |
size_t dataLength = data->byteLength(); |
if (!dataLength) |
return; |
@@ -214,7 +212,7 @@ void RTCDataChannel::send(PassRefPtr<DOMArrayBuffer> prpData, ExceptionState& ex |
} |
} |
-void RTCDataChannel::send(PassRefPtr<DOMArrayBufferView> data, ExceptionState& exceptionState) |
+void RTCDataChannel::send(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. |
@@ -272,8 +270,8 @@ void RTCDataChannel::didReceiveRawData(const char* data, size_t dataLength) |
return; |
} |
if (m_binaryType == BinaryTypeArrayBuffer) { |
- RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::create(data, dataLength); |
- scheduleDispatchEvent(MessageEvent::create(buffer.release())); |
+ DOMArrayBuffer* buffer = DOMArrayBuffer::create(data, dataLength); |
+ scheduleDispatchEvent(MessageEvent::create(buffer)); |
return; |
} |
NOTREACHED(); |