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

Side by Side Diff: src/value-serializer.h

Issue 2772723005: Export the current data format version used by ValueSerializer. (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « src/api.cc ('k') | src/value-serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 V8_VALUE_SERIALIZER_H_ 5 #ifndef V8_VALUE_SERIALIZER_H_
6 #define V8_VALUE_SERIALIZER_H_ 6 #define V8_VALUE_SERIALIZER_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 enum class SerializationTag : uint8_t; 36 enum class SerializationTag : uint8_t;
37 37
38 /** 38 /**
39 * Writes V8 objects in a binary format that allows the objects to be cloned 39 * Writes V8 objects in a binary format that allows the objects to be cloned
40 * according to the HTML structured clone algorithm. 40 * according to the HTML structured clone algorithm.
41 * 41 *
42 * Format is based on Blink's previous serialization logic. 42 * Format is based on Blink's previous serialization logic.
43 */ 43 */
44 class ValueSerializer { 44 class ValueSerializer {
45 public: 45 public:
46 static uint32_t GetCurrentDataFormatVersion();
47
46 ValueSerializer(Isolate* isolate, v8::ValueSerializer::Delegate* delegate); 48 ValueSerializer(Isolate* isolate, v8::ValueSerializer::Delegate* delegate);
47 ~ValueSerializer(); 49 ~ValueSerializer();
48 50
49 /* 51 /*
50 * Writes out a header, which includes the format version. 52 * Writes out a header, which includes the format version.
51 */ 53 */
52 void WriteHeader(); 54 void WriteHeader();
53 55
54 /* 56 /*
55 * Serializes a V8 object into the buffer. 57 * Serializes a V8 object into the buffer.
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 Handle<FixedArray> id_map_; 299 Handle<FixedArray> id_map_;
298 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_; 300 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_;
299 301
300 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer); 302 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer);
301 }; 303 };
302 304
303 } // namespace internal 305 } // namespace internal
304 } // namespace v8 306 } // namespace v8
305 307
306 #endif // V8_VALUE_SERIALIZER_H_ 308 #endif // V8_VALUE_SERIALIZER_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/value-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698