Don't abuse Blob deserialization constructor in WebSocket
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 May 2014 19:43:57 +0000 (19:43 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 May 2014 19:43:57 +0000 (19:43 +0000)
commit4c55d26793c0dbe4f4d0d29a66e04beaf670c5a8
tree6bc27413885b4bcecb43f86774c9ef3741e6f359
parent94546fda5df9e1049cb535a597ea58dfe85f65d0
Don't abuse Blob deserialization constructor in WebSocket
https://bugs.webkit.org/show_bug.cgi?id=132478

Reviewed by Sam Weinig.

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::enqueueBlobFrame): This is the important change -
Blob::create was called for no reason. If the blob came from a worker, it was
already cloned for cross-thread messaging, otherwise there is no reason to make
a new one.

* fileapi/Blob.h:
(WebCore::Blob::deserialize):
(WebCore::Blob::create): Deleted.
* fileapi/File.h:
(WebCore::File::deserialize):
(WebCore::File::create): Deleted.
Renamed a special case of "create" function to avoid explaining what it is for.

* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::send): Print a full URL in LOG(),
not one shortened to 1024 characters.
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readFile):
(WebCore::CloneDeserializer::readTerminal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.h
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/fileapi/Blob.h
Source/WebCore/fileapi/File.h