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

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

Issue 23992003: blob hacking webcore style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/websockets/NewWebSocketChannelImpl.cpp ('k') | Source/modules/websockets/WebSocketChannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/WebSocket.cpp
diff --git a/Source/modules/websockets/WebSocket.cpp b/Source/modules/websockets/WebSocket.cpp
index 5ab9914585c064a805bc8d9b4b4ad733cabcfe0e..d0fd46435ca48eb98565e4500aec2cc60f2606b4 100644
--- a/Source/modules/websockets/WebSocket.cpp
+++ b/Source/modules/websockets/WebSocket.cpp
@@ -340,7 +340,7 @@ void WebSocket::send(ArrayBufferView* arrayBufferView, ExceptionState& es)
void WebSocket::send(Blob* binaryData, ExceptionState& es)
{
- LOG(Network, "WebSocket %p send() Sending Blob '%s'", this, binaryData->url().elidedString().utf8().data());
+ LOG(Network, "WebSocket %p send() Sending Blob '%s'", this, binaryData->uuid().utf8().data());
ASSERT(binaryData);
if (m_state == CONNECTING) {
es.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("send", "WebSocket", "already in CONNECTING state."));
@@ -351,7 +351,7 @@ void WebSocket::send(Blob* binaryData, ExceptionState& es)
return;
}
ASSERT(m_channel);
- handleSendResult(m_channel->send(*binaryData), es);
+ handleSendResult(m_channel->send(binaryData->blobDataHandle()), es);
}
void WebSocket::close(unsigned short code, const String& reason, ExceptionState& es)
@@ -549,11 +549,9 @@ void WebSocket::didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData)
binaryData->swap(*rawData->mutableData());
OwnPtr<BlobData> blobData = BlobData::create();
blobData->appendData(rawData.release(), 0, BlobDataItem::toEndOfFile);
- RefPtr<Blob> blob = Blob::create(blobData.release(), size);
-
+ RefPtr<Blob> blob = Blob::create(BlobDataHandle::create(blobData.release(), size));
if (!m_stopped)
dispatchEvent(MessageEvent::create(blob.release(), SecurityOrigin::create(m_url)->toString()));
-
break;
}
« no previous file with comments | « Source/modules/websockets/NewWebSocketChannelImpl.cpp ('k') | Source/modules/websockets/WebSocketChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698