Index: Source/modules/websockets/NewWebSocketChannelImpl.cpp |
diff --git a/Source/modules/websockets/NewWebSocketChannelImpl.cpp b/Source/modules/websockets/NewWebSocketChannelImpl.cpp |
index a6c8a76d923c721f1879719f963c3db2f24c70f0..909139f6d1c28403c0286b68935201110ab5e1ec 100644 |
--- a/Source/modules/websockets/NewWebSocketChannelImpl.cpp |
+++ b/Source/modules/websockets/NewWebSocketChannelImpl.cpp |
@@ -140,7 +140,7 @@ bool isClean(int code) |
class NewWebSocketChannelImpl::BlobLoader : public FileReaderLoaderClient { |
public: |
- BlobLoader(const Blob&, NewWebSocketChannelImpl*); |
+ BlobLoader(PassRefPtr<BlobDataHandle>, NewWebSocketChannelImpl*); |
virtual ~BlobLoader() { } |
void cancel(); |
@@ -156,11 +156,11 @@ private: |
FileReaderLoader m_loader; |
}; |
-NewWebSocketChannelImpl::BlobLoader::BlobLoader(const Blob& blob, NewWebSocketChannelImpl* channel) |
+NewWebSocketChannelImpl::BlobLoader::BlobLoader(PassRefPtr<BlobDataHandle> blobData, NewWebSocketChannelImpl* channel) |
: m_channel(channel) |
, m_loader(FileReaderLoader::ReadAsArrayBuffer, this) |
{ |
- m_loader.start(channel->scriptExecutionContext(), blob); |
+ m_loader.start(channel->scriptExecutionContext(), blobData); |
} |
void NewWebSocketChannelImpl::BlobLoader::cancel() |
@@ -308,9 +308,9 @@ WebSocketChannel::SendResult NewWebSocketChannelImpl::send(const String& message |
return SendSuccess; |
} |
-WebSocketChannel::SendResult NewWebSocketChannelImpl::send(const Blob& blob) |
+WebSocketChannel::SendResult NewWebSocketChannelImpl::send(PassRefPtr<BlobDataHandle> blobData) |
{ |
- m_messages.append(Message(blob)); |
+ m_messages.append(Message(blobData)); |
sendInternal(); |
return SendSuccess; |
} |
@@ -427,9 +427,9 @@ NewWebSocketChannelImpl::Message::Message(const String& text) |
: type(MessageTypeText) |
, text(text.utf8(String::StrictConversionReplacingUnpairedSurrogatesWithFFFD)) { } |
-NewWebSocketChannelImpl::Message::Message(const Blob& blob) |
+NewWebSocketChannelImpl::Message::Message(PassRefPtr<BlobDataHandle> blobData) |
: type(MessageTypeBlob) |
- , blob(Blob::create(blob.url(), blob.type(), blob.size())) { } |
+ , blobData(blobData) { } |
NewWebSocketChannelImpl::Message::Message(PassRefPtr<ArrayBuffer> arrayBuffer) |
: type(MessageTypeArrayBuffer) |
@@ -455,7 +455,7 @@ void NewWebSocketChannelImpl::sendInternal() |
} |
case MessageTypeBlob: |
ASSERT(!m_blobLoader); |
- m_blobLoader = adoptPtr(new BlobLoader(*message.blob, this)); |
+ m_blobLoader = adoptPtr(new BlobLoader(message.blobData, this)); |
break; |
case MessageTypeArrayBuffer: { |
WebSocketHandle::MessageType type = |