12011-08-16 Yuta Kitamura <yutak@chromium.org>
2
3 Construct SerializedScriptValue from Blob
4 https://bugs.webkit.org/show_bug.cgi?id=66127
5
6 Reviewed by NOBODY (OOPS!).
7
8 Add a new overloaded function of SerializedScriptValue::create() which takes a Blob
9 as its argument. This will be used to construct a MessageEvent containing a Blob as
10 its "data" attribute.
11
12 Blob serialization is already implemented in both JSC and V8. This change only adds
13 an internal interface to create a SerializedScriptObject representing a Blob.
14
15 No new tests, because the new function is not used yet and there is no visible change
16 in functionality. New tests will be added when WebSocket binary messaging is
17 implemented, and they will cover this code change.
18
19 * bindings/js/SerializedScriptValue.cpp:
20 (WebCore::CloneSerializer::writeStringData): Added.
21 (WebCore::CloneSerializer::serialize):
22 Serialization format is "BlobTag <url:StringData><type:StringData><size:long long>".
23 (WebCore::SerializedScriptValue::create):
24 * bindings/js/SerializedScriptValue.h:
25 * bindings/v8/SerializedScriptValue.cpp:
26 (WebCore::SerializedScriptValue::create):
27 * bindings/v8/SerializedScriptValue.h:
28