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

Unified Diff: Source/modules/websockets/DocumentWebSocketChannel.cpp

Issue 711763002: bindings: Transition from ArrayBuffer to DOMArrayBuffer, part 2 (2nd round) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixes Win x64 build. Created 6 years, 1 month 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
Index: Source/modules/websockets/DocumentWebSocketChannel.cpp
diff --git a/Source/modules/websockets/DocumentWebSocketChannel.cpp b/Source/modules/websockets/DocumentWebSocketChannel.cpp
index 88ca7ef95dcd33c6c35fd527133e375435c28f92..7d416a21fe3ea4ad84ecf36da4afd5dc2062cc0b 100644
--- a/Source/modules/websockets/DocumentWebSocketChannel.cpp
+++ b/Source/modules/websockets/DocumentWebSocketChannel.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "modules/websockets/DocumentWebSocketChannel.h"
+#include "core/dom/DOMArrayBuffer.h"
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
#include "core/fileapi/FileReaderLoader.h"
@@ -200,7 +201,7 @@ void DocumentWebSocketChannel::send(PassRefPtr<BlobDataHandle> blobDataHandle)
sendInternal();
}
-void DocumentWebSocketChannel::send(const ArrayBuffer& buffer, unsigned byteOffset, unsigned byteLength)
+void DocumentWebSocketChannel::send(const DOMArrayBuffer& buffer, unsigned byteOffset, unsigned byteLength)
{
WTF_LOG(Network, "DocumentWebSocketChannel %p sendArrayBuffer(%p, %u, %u)", this, buffer.data(), byteOffset, byteLength);
if (m_identifier) {
@@ -287,7 +288,7 @@ DocumentWebSocketChannel::Message::Message(PassRefPtr<BlobDataHandle> blobDataHa
: type(MessageTypeBlob)
, blobDataHandle(blobDataHandle) { }
-DocumentWebSocketChannel::Message::Message(PassRefPtr<ArrayBuffer> arrayBuffer)
+DocumentWebSocketChannel::Message::Message(PassRefPtr<DOMArrayBuffer> arrayBuffer)
: type(MessageTypeArrayBuffer)
, arrayBuffer(arrayBuffer) { }
@@ -328,7 +329,7 @@ void DocumentWebSocketChannel::sendInternal()
case MessageTypeArrayBuffer: {
WebSocketHandle::MessageType type =
m_sentSizeOfTopMessage ? WebSocketHandle::MessageTypeContinuation : WebSocketHandle::MessageTypeBinary;
- size_t size = std::min(static_cast<size_t>(m_sendingQuota), message->arrayBuffer->byteLength() - m_sentSizeOfTopMessage);
+ size_t size = std::min(static_cast<size_t>(m_sendingQuota), static_cast<size_t>(message->arrayBuffer->byteLength() - m_sentSizeOfTopMessage));
final = (m_sentSizeOfTopMessage + size == message->arrayBuffer->byteLength());
m_handle->send(final, type, static_cast<const char*>(message->arrayBuffer->data()) + m_sentSizeOfTopMessage, size);
m_sentSizeOfTopMessage += size;
@@ -561,7 +562,7 @@ void DocumentWebSocketChannel::didStartClosingHandshake(WebSocketHandle* handle)
m_client->didStartClosingHandshake();
}
-void DocumentWebSocketChannel::didFinishLoadingBlob(PassRefPtr<ArrayBuffer> buffer)
+void DocumentWebSocketChannel::didFinishLoadingBlob(PassRefPtr<DOMArrayBuffer> buffer)
{
m_blobLoader.clear();
ASSERT(m_handle);
« no previous file with comments | « Source/modules/websockets/DocumentWebSocketChannel.h ('k') | Source/modules/websockets/DocumentWebSocketChannelTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698