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

Unified Diff: WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.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
« no previous file with comments | « WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h ('k') | WebCore/WebCore.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp
===================================================================
--- WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp (revision 140218)
+++ WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp (working copy)
@@ -102,7 +102,7 @@
{
if (!m_bridge)
return ThreadableWebSocketChannel::SendFail;
- return m_bridge->send(binaryData);
+ return m_bridge->send(binaryData.blobDataHandle());
}
unsigned long WorkerThreadableWebSocketChannel::bufferedAmount() const
@@ -464,13 +464,13 @@
peer->send(*arrayBuffer);
}
-void WorkerThreadableWebSocketChannel::mainThreadSendBlob(ScriptExecutionContext* context, Peer* peer, const KURL& url, const String& type, long long size)
+void WorkerThreadableWebSocketChannel::mainThreadSendBlob(ScriptExecutionContext* context, Peer* peer, PassRefPtr<BlobDataHandle> blobDataHandle)
{
ASSERT(isMainThread());
ASSERT_UNUSED(context, context->isDocument());
ASSERT(peer);
- RefPtr<Blob> blob = Blob::create(url, type, size);
+ RefPtr<Blob> blob = Blob::create(blobDataHandle);
peer->send(*blob);
}
@@ -506,12 +506,13 @@
return clientWrapper->sendRequestResult();
}
-ThreadableWebSocketChannel::SendResult WorkerThreadableWebSocketChannel::Bridge::send(const Blob& binaryData)
+
+ThreadableWebSocketChannel::SendResult WorkerThreadableWebSocketChannel::Bridge::send(PassRefPtr<BlobDataHandle> blobDataHandle)
{
if (!m_workerClientWrapper || !m_peer)
return ThreadableWebSocketChannel::SendFail;
setMethodNotCompleted();
- m_loaderProxy.postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadSendBlob, AllowCrossThreadAccess(m_peer), binaryData.url(), binaryData.type(), binaryData.size()));
+ m_loaderProxy.postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadSendBlob, AllowCrossThreadAccess(m_peer), blobDataHandle));
RefPtr<Bridge> protect(this);
waitForMethodCompletion();
ThreadableWebSocketChannelClientWrapper* clientWrapper = m_workerClientWrapper.get();
« no previous file with comments | « WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h ('k') | WebCore/WebCore.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698