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

Unified Diff: Source/bindings/core/v8/SerializationTag.h

Issue 1205973002: Support structured cloning of ES'15 Map and Set (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add new test for Map/Set serialization format Created 5 years, 6 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 | « Source/bindings/core/v8/ScriptValueSerializer.cpp ('k') | Source/bindings/core/v8/SerializedScriptValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/SerializationTag.h
diff --git a/Source/bindings/core/v8/SerializationTag.h b/Source/bindings/core/v8/SerializationTag.h
index bb0c4eceed003dd687da6690a71203927312a113..eb09eeed5546b09c3974b8a5238318fcc56f7a44 100644
--- a/Source/bindings/core/v8/SerializationTag.h
+++ b/Source/bindings/core/v8/SerializationTag.h
@@ -79,6 +79,13 @@ enum SerializationTag {
TrueObjectTag = 'y', // new Boolean(true) (ref)
FalseObjectTag = 'x', // new Boolean(false) (ref)
CompositorProxyTag = 'C', // elementId:uint64_t, bitfields:uint32_t -> CompositorProxy (ref)
+ MapTag = ':', // length:uint32_t -> pops the last object from the open stack (it will be a Map);
+ // fills it with the last length elements pushed onto the deserialization stack, treating them as key/value pairs and passing them to Map::Set;
+ // length must be an even number.
+ SetTag = ',', // length:uint32_t -> pops the last object from the open stack (it will be a Set);
+ // fills it with the last length elements pushed onto the deserialization stack, using Set::Add
+ GenerateFreshMapTag = ';', // -> empty Map allocated an object ID and pushed onto the open stack (ref)
+ GenerateFreshSetTag = '\'', // -> empty Set allocated an object ID and pushed onto the open stack (ref)
VersionTag = 0xFF // version:uint32_t -> Uses this as the file version.
};
« no previous file with comments | « Source/bindings/core/v8/ScriptValueSerializer.cpp ('k') | Source/bindings/core/v8/SerializedScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698