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

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

Issue 2804643006: Expose the ValueSerializer data format version as a compile-time constant. (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/v8.gyp ('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
48 ValueSerializer(Isolate* isolate, v8::ValueSerializer::Delegate* delegate); 46 ValueSerializer(Isolate* isolate, v8::ValueSerializer::Delegate* delegate);
49 ~ValueSerializer(); 47 ~ValueSerializer();
50 48
51 /* 49 /*
52 * Writes out a header, which includes the format version. 50 * Writes out a header, which includes the format version.
53 */ 51 */
54 void WriteHeader(); 52 void WriteHeader();
55 53
56 /* 54 /*
57 * Serializes a V8 object into the buffer. 55 * Serializes a V8 object into the buffer.
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 Handle<FixedArray> id_map_; 297 Handle<FixedArray> id_map_;
300 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_; 298 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_;
301 299
302 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer); 300 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer);
303 }; 301 };
304 302
305 } // namespace internal 303 } // namespace internal
306 } // namespace v8 304 } // namespace v8
307 305
308 #endif // V8_VALUE_SERIALIZER_H_ 306 #endif // V8_VALUE_SERIALIZER_H_
OLDNEW
« no previous file with comments | « src/v8.gyp ('k') | src/value-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698