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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/SerializationTag.h

Issue 2255673003: [wasm] Support wasm module structured cloning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LayoutTests and virtual path Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SerializationTag_h 5 #ifndef SerializationTag_h
6 #define SerializationTag_h 6 #define SerializationTag_h
7 7
8 namespace blink { 8 namespace blink {
9 9
10 // Serialization format is a sequence of tags followed by zero or more data argu ments. 10 // Serialization format is a sequence of tags followed by zero or more data argu ments.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 NumberTag = 'N', // value:double -> Number 44 NumberTag = 'N', // value:double -> Number
45 BlobTag = 'b', // uuid:WebCoreString, type:WebCoreString, size:uint64_t -> B lob (ref) 45 BlobTag = 'b', // uuid:WebCoreString, type:WebCoreString, size:uint64_t -> B lob (ref)
46 BlobIndexTag = 'i', // index:int32_t -> Blob (ref) 46 BlobIndexTag = 'i', // index:int32_t -> Blob (ref)
47 FileTag = 'f', // file:RawFile -> File (ref) 47 FileTag = 'f', // file:RawFile -> File (ref)
48 FileIndexTag = 'e', // index:int32_t -> File (ref) 48 FileIndexTag = 'e', // index:int32_t -> File (ref)
49 DOMFileSystemTag = 'd', // type:int32_t, name:WebCoreString, uuid:WebCoreStr ing -> FileSystem (ref) 49 DOMFileSystemTag = 'd', // type:int32_t, name:WebCoreString, uuid:WebCoreStr ing -> FileSystem (ref)
50 FileListTag = 'l', // length:uint32_t, files:RawFile[length] -> FileList (re f) 50 FileListTag = 'l', // length:uint32_t, files:RawFile[length] -> FileList (re f)
51 FileListIndexTag = 'L', // length:uint32_t, files:int32_t[length] -> FileLis t (ref) 51 FileListIndexTag = 'L', // length:uint32_t, files:int32_t[length] -> FileLis t (ref)
52 ImageDataTag = '#', // width:uint32_t, height:uint32_t, pixelDataLength:uint 32_t, data:byte[pixelDataLength] -> ImageData (ref) 52 ImageDataTag = '#', // width:uint32_t, height:uint32_t, pixelDataLength:uint 32_t, data:byte[pixelDataLength] -> ImageData (ref)
53 ObjectTag = '{', // numProperties:uint32_t -> pops the last object from the open stack; 53 ObjectTag = '{', // numProperties:uint32_t -> pops the last object from the open stack;
54 // fills it with the last numProp erties name,value pairs pushed onto the deserialization stack 54 // fills it with the last numProperti es name,value pairs pushed onto the deserialization stack
55 SparseArrayTag = '@', // numProperties:uint32_t, length:uint32_t -> pops the last object from the open stack; 55 SparseArrayTag = '@', // numProperties:uint32_t, length:uint32_t -> pops the last object from the open stack;
56 // fills it with the last numProperties name,value pairs pushed onto the deserialization st ack 56 // fills it wit h the last numProperties name,value pairs pushed onto the deserialization stack
57 DenseArrayTag = '$', // numProperties:uint32_t, length:uint32_t -> pops the last object from the open stack; 57 DenseArrayTag = '$', // numProperties:uint32_t, length:uint32_t -> pops the last object from the open stack;
58 // fills it with the last length elements and numProperties name,value pairs pushed onto des erialization stack 58 // fills it with the last length elements and numProperties name,value pairs pushed onto deseria lization stack
59 RegExpTag = 'R', // pattern:RawString, flags:uint32_t -> RegExp (ref) 59 RegExpTag = 'R', // pattern:RawString, flags:uint32_t -> RegExp (ref)
60 ArrayBufferTag = 'B', // byteLength:uint32_t, data:byte[byteLength] -> Array Buffer (ref) 60 ArrayBufferTag = 'B', // byteLength:uint32_t, data:byte[byteLength] -> Array Buffer (ref)
61 ArrayBufferTransferTag = 't', // index:uint32_t -> ArrayBuffer. For ArrayBuf fer transfer 61 ArrayBufferTransferTag = 't', // index:uint32_t -> ArrayBuffer. For ArrayBuf fer transfer
62 ImageBitmapTag = 'g', // size:uint32_t, data:byte[size] -> ImageBitmap (ref) 62 ImageBitmapTag = 'g', // size:uint32_t, data:byte[size] -> ImageBitmap (ref)
63 ImageBitmapTransferTag = 'G', // index:uint32_t -> ImageBitmap. For ImageBit map transfer 63 ImageBitmapTransferTag = 'G', // index:uint32_t -> ImageBitmap. For ImageBit map transfer
64 OffscreenCanvasTransferTag = 'H', // index, width, height, id:uint32_t -> Of fscreenCanvas. For OffscreenCanvas transfer 64 OffscreenCanvasTransferTag = 'H', // index, width, height, id:uint32_t -> Of fscreenCanvas. For OffscreenCanvas transfer
65 ArrayBufferViewTag = 'V', // subtag:byte, byteOffset:uint32_t, byteLength:ui nt32_t -> ArrayBufferView (ref). Consumes an ArrayBuffer from the top of the des erialization stack. 65 ArrayBufferViewTag = 'V', // subtag:byte, byteOffset:uint32_t, byteLength:ui nt32_t -> ArrayBufferView (ref). Consumes an ArrayBuffer from the top of the des erialization stack.
66 SharedArrayBufferTransferTag = 'u', // index:uint32_t -> SharedArrayBuffer. For SharedArrayBuffer transfer 66 SharedArrayBufferTransferTag = 'u', // index:uint32_t -> SharedArrayBuffer. For SharedArrayBuffer transfer
67 WasmModuleTag = 'W',
67 CryptoKeyTag = 'K', // subtag:byte, props, usages:uint32_t, keyDataLength:ui nt32_t, keyData:byte[keyDataLength] 68 CryptoKeyTag = 'K', // subtag:byte, props, usages:uint32_t, keyDataLength:ui nt32_t, keyData:byte[keyDataLength]
68 // If subtag=AesKeyTag: 69 // If subtag=AesKeyTag:
69 // props = keyLengthBytes:uint32_t, algorithmId:uint 32_t 70 // props = keyLengthBytes:uint32_t, algorithmId:uint32_t
70 // If subtag=HmacKeyTag: 71 // If subtag=HmacKeyTag:
71 // props = keyLengthBytes:uint32_t, hashId:uint32_t 72 // props = keyLengthBytes:uint32_t, hashId:uint32_t
72 // If subtag=RsaHashedKeyTag: 73 // If subtag=RsaHashedKeyTag:
73 // props = algorithmId:uint32_t, type:uint32_t, modu lusLengthBits:uint32_t, publicExponentLength:uint32_t, publicExponent:byte[publi cExponentLength], hashId:uint32_t 74 // props = algorithmId:uint32_t, type:uint32_t, modulusL engthBits:uint32_t, publicExponentLength:uint32_t, publicExponent:byte[publicExp onentLength], hashId:uint32_t
74 // If subtag=EcKeyTag: 75 // If subtag=EcKeyTag:
75 // props = algorithmId:uint32_t, type:uint32_t, name dCurve:uint32_t 76 // props = algorithmId:uint32_t, type:uint32_t, namedCur ve:uint32_t
76 RTCCertificateTag = 'k', // length:uint32_t, pemPrivateKey:WebCoreString, pe mCertificate:WebCoreString 77 RTCCertificateTag = 'k', // length:uint32_t, pemPrivateKey:WebCoreString, pe mCertificate:WebCoreString
77 ObjectReferenceTag = '^', // ref:uint32_t -> reference table[ref] 78 ObjectReferenceTag = '^', // ref:uint32_t -> reference table[ref]
78 GenerateFreshObjectTag = 'o', // -> empty object allocated an object ID and pushed onto the open stack (ref) 79 GenerateFreshObjectTag = 'o', // -> empty object allocated an object ID and pushed onto the open stack (ref)
79 GenerateFreshSparseArrayTag = 'a', // length:uint32_t -> empty array[length] allocated an object ID and pushed onto the open stack (ref) 80 GenerateFreshSparseArrayTag = 'a', // length:uint32_t -> empty array[length] allocated an object ID and pushed onto the open stack (ref)
80 GenerateFreshDenseArrayTag = 'A', // length:uint32_t -> empty array[length] allocated an object ID and pushed onto the open stack (ref) 81 GenerateFreshDenseArrayTag = 'A', // length:uint32_t -> empty array[length] allocated an object ID and pushed onto the open stack (ref)
81 ReferenceCountTag = '?', // refTableSize:uint32_t -> If the reference table is not refTableSize big, fails. 82 ReferenceCountTag = '?', // refTableSize:uint32_t -> If the reference table is not refTableSize big, fails.
82 StringObjectTag = 's', // string:RawString -> new String(string) (ref) 83 StringObjectTag = 's', // string:RawString -> new String(string) (ref)
83 NumberObjectTag = 'n', // value:double -> new Number(value) (ref) 84 NumberObjectTag = 'n', // value:double -> new Number(value) (ref)
84 TrueObjectTag = 'y', // new Boolean(true) (ref) 85 TrueObjectTag = 'y', // new Boolean(true) (ref)
85 FalseObjectTag = 'x', // new Boolean(false) (ref) 86 FalseObjectTag = 'x', // new Boolean(false) (ref)
86 CompositorProxyTag = 'C', // elementId:uint64_t, bitfields:uint32_t -> Compo sitorProxy (ref) 87 CompositorProxyTag = 'C', // elementId:uint64_t, bitfields:uint32_t -> Compo sitorProxy (ref)
87 MapTag = ':', // length:uint32_t -> pops the last object from the open stack (it will be a Map); 88 MapTag = ':', // length:uint32_t -> pops the last object from the open stack (it will be a Map);
88 // fills it with the last length elements p ushed onto the deserialization stack, treating them as key/value pairs and passi ng them to Map::Set; 89 // fills it with the last length elements pushe d onto the deserialization stack, treating them as key/value pairs and passing t hem to Map::Set;
89 // length must be an even number. 90 // length must be an even number.
90 SetTag = ',', // length:uint32_t -> pops the last object from the open stack (it will be a Set); 91 SetTag = ',', // length:uint32_t -> pops the last object from the open stack (it will be a Set);
91 // fills it with the last length elements p ushed onto the deserialization stack, using Set::Add 92 // fills it with the last length elements pushe d onto the deserialization stack, using Set::Add
92 GenerateFreshMapTag = ';', // -> empty Map allocated an object ID and pushed onto the open stack (ref) 93 GenerateFreshMapTag = ';', // -> empty Map allocated an object ID and pushed onto the open stack (ref)
93 GenerateFreshSetTag = '\'', // -> empty Set allocated an object ID and pushe d onto the open stack (ref) 94 GenerateFreshSetTag = '\'', // -> empty Set allocated an object ID and pushe d onto the open stack (ref)
94 VersionTag = 0xFF // version:uint32_t -> Uses this as the file version. 95 VersionTag = 0xFF // version:uint32_t -> Uses this as the file version.
95 }; 96 };
96 97
97 enum ArrayBufferViewSubTag { 98 enum ArrayBufferViewSubTag {
98 ByteArrayTag = 'b', 99 ByteArrayTag = 'b',
99 UnsignedByteArrayTag = 'B', 100 UnsignedByteArrayTag = 'B',
100 UnsignedByteClampedArrayTag = 'C', 101 UnsignedByteClampedArrayTag = 'C',
101 ShortArrayTag = 'w', 102 ShortArrayTag = 'w',
102 UnsignedShortArrayTag = 'W', 103 UnsignedShortArrayTag = 'W',
103 IntArrayTag = 'd', 104 IntArrayTag = 'd',
104 UnsignedIntArrayTag = 'D', 105 UnsignedIntArrayTag = 'D',
105 FloatArrayTag = 'f', 106 FloatArrayTag = 'f',
106 DoubleArrayTag = 'F', 107 DoubleArrayTag = 'F',
107 DataViewTag = '?' 108 DataViewTag = '?'
108 }; 109 };
109 110
110 } // namespace blink 111 } // namespace blink
111 112
112 #endif 113 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698