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

Unified Diff: WebCore/Modules/websockets/WebSocketChannel.cpp

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 7 years, 11 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
Index: WebCore/Modules/websockets/WebSocketChannel.cpp
===================================================================
--- WebCore/Modules/websockets/WebSocketChannel.cpp (revision 140218)
+++ WebCore/Modules/websockets/WebSocketChannel.cpp (working copy)
@@ -157,7 +157,7 @@
ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const Blob& binaryData)
{
- LOG(Network, "WebSocketChannel %p send blob %s", this, binaryData.url().string().utf8().data());
+ LOG(Network, "WebSocketChannel %p send blob %s", this, binaryData.uuid().utf8().data());
enqueueBlobFrame(WebSocketFrame::OpCodeBinary, binaryData);
return ThreadableWebSocketChannel::SendSuccess;
}
@@ -704,7 +704,7 @@
OwnPtr<QueuedFrame> frame = adoptPtr(new QueuedFrame);
frame->opCode = opCode;
frame->frameType = QueuedFrameTypeBlob;
- frame->blobData = Blob::create(blob.url(), blob.type(), blob.size());
+ frame->blobData = Blob::create(blob.blobDataHandle());
m_outgoingFrameQueue.append(frame.release());
processOutgoingFrameQueue();
}
@@ -730,6 +730,8 @@
case QueuedFrameTypeBlob: {
#if ENABLE(BLOB)
+ // FIXME: Read and write incrementally. This may be a large amount of data, too large
+ // to reasonably load into an array buffer.
switch (m_blobLoaderStatus) {
case BlobLoaderNotStarted:
ref(); // Will be derefed after didFinishLoading() or didFail().
« no previous file with comments | « WebCore/Modules/websockets/WebSocket.cpp ('k') | WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698