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(); |