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

Side by Side Diff: Source/bindings/core/v8/ScriptValueSerializer.h

Issue 721133002: bindings: preparation for fixing incorrect dependency of SerializedScriptValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ScriptValueSerializer_h
6 #define ScriptValueSerializer_h
7
8 #include "bindings/core/v8/SerializationTag.h"
9 #include "bindings/core/v8/SerializedScriptValue.h"
10 #include "bindings/core/v8/V8Binding.h"
11 #include "public/platform/WebCrypto.h"
12 #include "public/platform/WebCryptoKey.h"
13 #include "public/platform/WebCryptoKeyAlgorithm.h"
14 #include "wtf/ArrayBufferContents.h"
15 #include "wtf/HashMap.h"
16 #include "wtf/Noncopyable.h"
17 #include "wtf/Vector.h"
18 #include "wtf/text/WTFString.h"
19 #include <v8.h>
20
21 namespace WTF {
22
23 class ArrayBuffer;
24 class ArrayBufferView;
25
26 }
27
28 namespace blink {
29
30 class File;
31 class FileList;
32
33 namespace SerializedScriptValueInternal {
34
35 typedef Vector<WTF::ArrayBufferContents, 1> ArrayBufferContentsArray;
36
37 // V8ObjectMap is a map from V8 objects to arbitrary values of type T.
38 // V8 objects (or handles to V8 objects) cannot be used as keys in ordinary wtf: :HashMaps;
39 // this class should be used instead. GCObject must be a subtype of v8::Object.
40 // Suggested usage:
41 // V8ObjectMap<v8::Object, int> map;
42 // v8::Handle<v8::Object> obj = ...;
43 // map.set(obj, 42);
44 template<typename GCObject, typename T>
45 class V8ObjectMap {
46 public:
47 bool contains(const v8::Handle<GCObject>& handle)
48 {
49 return m_map.contains(*handle);
50 }
51
52 bool tryGet(const v8::Handle<GCObject>& handle, T* valueOut)
53 {
54 typename HandleToT::iterator result = m_map.find(*handle);
55 if (result != m_map.end()) {
56 *valueOut = result->value;
57 return true;
58 }
59 return false;
60 }
61
62 void set(const v8::Handle<GCObject>& handle, const T& value)
63 {
64 m_map.set(*handle, value);
65 }
66
67 private:
68 // This implementation uses GetIdentityHash(), which sets a hidden property on the object containing
69 // a random integer (or returns the one that had been previously set). This ensures that the table
70 // never needs to be rebuilt across garbage collections at the expense of do ing additional allocation
71 // and making more round trips into V8. Note that since GetIdentityHash() is defined only on
72 // v8::Objects, this V8ObjectMap cannot be used to map v8::Strings to T (bec ause the public V8 API
73 // considers a v8::String to be a v8::Primitive).
74
75 // If V8 exposes a way to get at the address of the object held by a handle, then we can produce
76 // an alternate implementation that does not need to do any V8-side allocati on; however, it will
77 // need to rehash after every garbage collection because a key object may ha ve been moved.
78 template<typename G>
79 struct V8HandlePtrHash {
80 static v8::Handle<G> unsafeHandleFromRawValue(const G* value)
81 {
82 const v8::Handle<G>* handle = reinterpret_cast<const v8::Handle<G>*> (&value);
83 return *handle;
84 }
85
86 static unsigned hash(const G* key)
87 {
88 return static_cast<unsigned>(unsafeHandleFromRawValue(key)->GetIdent ityHash());
89 }
90 static bool equal(const G* a, const G* b)
91 {
92 return unsafeHandleFromRawValue(a) == unsafeHandleFromRawValue(b);
93 }
94 // For HashArg.
95 static const bool safeToCompareToEmptyOrDeleted = false;
96 };
97
98 typedef WTF::HashMap<GCObject*, T, V8HandlePtrHash<GCObject> > HandleToT;
99 HandleToT m_map;
100 };
101
102 // Writer is responsible for serializing primitive types and storing
103 // information used to reconstruct composite types.
104 class Writer {
105 STACK_ALLOCATED();
106 WTF_MAKE_NONCOPYABLE(Writer);
107 public:
108 typedef UChar BufferValueType;
109
110 Writer()
111 : m_position(0)
112 {
113 }
114
115 // Write functions for primitive types.
116
117 void writeUndefined();
118 void writeNull();
119 void writeTrue();
120 void writeFalse();
121 void writeBooleanObject(bool value);
122 void writeOneByteString(v8::Handle<v8::String>&);
123 void writeUCharString(v8::Handle<v8::String>&);
124 void writeStringObject(const char* data, int length);
125 void writeWebCoreString(const String&);
126 void writeVersion();
127 void writeInt32(int32_t value);
128 void writeUint32(uint32_t value);
129 void writeDate(double numberValue);
130 void writeNumber(double number);
131 void writeNumberObject(double number);
132 void writeBlob(const String& uuid, const String& type, unsigned long long si ze);
133 void writeBlobIndex(int blobIndex);
134 void writeDOMFileSystem(int type, const String& name, const String& url);
135 void writeFile(const File&);
136 void writeFileIndex(int blobIndex);
137 void writeFileList(const FileList&);
138 void writeFileListIndex(const Vector<int>& blobIndices);
139 bool writeCryptoKey(const WebCryptoKey&);
140 void writeArrayBuffer(const ArrayBuffer&);
141 void writeArrayBufferView(const ArrayBufferView&);
142 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat a, uint32_t pixelDataLength);
143 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags);
144 void writeTransferredMessagePort(uint32_t index);
145 void writeTransferredArrayBuffer(uint32_t index);
146 void writeObjectReference(uint32_t reference);
147 void writeObject(uint32_t numProperties);
148 void writeSparseArray(uint32_t numProperties, uint32_t length);
149 void writeDenseArray(uint32_t numProperties, uint32_t length);
150 String takeWireString();
151 void writeReferenceCount(uint32_t numberOfReferences);
152 void writeGenerateFreshObject();
153 void writeGenerateFreshSparseArray(uint32_t length);
154 void writeGenerateFreshDenseArray(uint32_t length);
155
156 protected:
157 void doWriteFile(const File&);
158 void doWriteArrayBuffer(const ArrayBuffer&);
159 void doWriteString(const char* data, int length);
160 void doWriteWebCoreString(const String&);
161 void doWriteHmacKey(const WebCryptoKey&);
162 void doWriteAesKey(const WebCryptoKey&);
163 void doWriteRsaHashedKey(const WebCryptoKey&);
164 void doWriteAlgorithmId(WebCryptoAlgorithmId);
165 void doWriteKeyUsages(const WebCryptoKeyUsageMask usages, bool extractable);
166 int bytesNeededToWireEncode(uint32_t value);
167
168 template<class T>
169 void doWriteUintHelper(T value)
170 {
171 while (true) {
172 uint8_t b = (value & SerializedScriptValue::varIntMask);
173 value >>= SerializedScriptValue::varIntShift;
174 if (!value) {
175 append(b);
176 break;
177 }
178 append(b | (1 << SerializedScriptValue::varIntShift));
179 }
180 }
181
182 void doWriteUint32(uint32_t value);
183 void doWriteUint64(uint64_t value);
184 void doWriteNumber(double number);
185 void append(SerializationTag);
186 void append(uint8_t b);
187 void append(const uint8_t* data, int length);
188 void ensureSpace(unsigned extra);
189 void fillHole();
190 uint8_t* byteAt(int position);
191 int v8StringWriteOptions();
192
193 private:
194 Vector<BufferValueType> m_buffer;
195 unsigned m_position;
196 };
197
198 class Serializer {
199 STACK_ALLOCATED();
200 WTF_MAKE_NONCOPYABLE(Serializer);
201 protected:
202 class StateBase;
203 public:
204 enum Status {
205 Success,
206 InputError,
207 DataCloneError,
208 JSException
209 };
210
211 Serializer(Writer&, MessagePortArray* messagePorts, ArrayBufferArray* arrayB uffers, WebBlobInfoArray*, BlobDataHandleMap& blobDataHandles, v8::TryCatch&, Sc riptState*);
212 v8::Isolate* isolate() { return m_scriptState->isolate(); }
213
214 Status serialize(v8::Handle<v8::Value>);
215 String errorMessage() { return m_errorMessage; }
216
217 // Functions used by serialization states.
218 Serializer::StateBase* doSerialize(v8::Handle<v8::Value>, Serializer::StateB ase* next);
219
220 StateBase* doSerializeArrayBuffer(v8::Handle<v8::Value> arrayBuffer, StateBa se* next);
221 StateBase* checkException(StateBase*);
222 StateBase* writeObject(uint32_t numProperties, StateBase*);
223 StateBase* writeSparseArray(uint32_t numProperties, uint32_t length, StateBa se*);
224 StateBase* writeDenseArray(uint32_t numProperties, uint32_t length, StateBas e*);
225
226 protected:
227 class StateBase {
228 WTF_MAKE_NONCOPYABLE(StateBase);
229 public:
230 virtual ~StateBase() { }
231
232 // Link to the next state to form a stack.
233 StateBase* nextState() { return m_next; }
234
235 // Composite object we're processing in this state.
236 v8::Handle<v8::Value> composite() { return m_composite; }
237
238 // Serializes (a part of) the current composite and returns
239 // the next state to process or null when this is the final
240 // state.
241 virtual StateBase* advance(Serializer&) = 0;
242
243 protected:
244 StateBase(v8::Handle<v8::Value> composite, StateBase* next)
245 : m_composite(composite)
246 , m_next(next)
247 {
248 }
249
250 private:
251 v8::Handle<v8::Value> m_composite;
252 StateBase* m_next;
253 };
254
255 // Dummy state that is used to signal serialization errors.
256 class ErrorState final : public StateBase {
257 public:
258 ErrorState()
259 : StateBase(v8Undefined(), 0)
260 {
261 }
262
263 virtual StateBase* advance(Serializer&) override
264 {
265 delete this;
266 return 0;
267 }
268 };
269
270 template <typename T>
271 class State : public StateBase {
272 public:
273 v8::Handle<T> composite() { return v8::Handle<T>::Cast(StateBase::compos ite()); }
274
275 protected:
276 State(v8::Handle<T> composite, StateBase* next)
277 : StateBase(composite, next)
278 {
279 }
280 };
281
282 class AbstractObjectState : public State<v8::Object> {
283 public:
284 AbstractObjectState(v8::Handle<v8::Object> object, StateBase* next)
285 : State<v8::Object>(object, next)
286 , m_index(0)
287 , m_numSerializedProperties(0)
288 , m_nameDone(false)
289 {
290 }
291
292 protected:
293 virtual StateBase* objectDone(unsigned numProperties, Serializer&) = 0;
294
295 StateBase* serializeProperties(bool ignoreIndexed, Serializer&);
296 v8::Local<v8::Array> m_propertyNames;
297
298 private:
299 v8::Local<v8::Value> m_propertyName;
300 unsigned m_index;
301 unsigned m_numSerializedProperties;
302 bool m_nameDone;
303 };
304
305 class ObjectState final : public AbstractObjectState {
306 public:
307 ObjectState(v8::Handle<v8::Object> object, StateBase* next)
308 : AbstractObjectState(object, next)
309 {
310 }
311
312 virtual StateBase* advance(Serializer&) override;
313
314 protected:
315 virtual StateBase* objectDone(unsigned numProperties, Serializer&) overr ide;
316 };
317
318 class DenseArrayState final : public AbstractObjectState {
319 public:
320 DenseArrayState(v8::Handle<v8::Array> array, v8::Handle<v8::Array> prope rtyNames, StateBase* next, v8::Isolate* isolate)
321 : AbstractObjectState(array, next)
322 , m_arrayIndex(0)
323 , m_arrayLength(array->Length())
324 {
325 m_propertyNames = v8::Local<v8::Array>::New(isolate, propertyNames);
326 }
327
328 virtual StateBase* advance(Serializer&) override;
329
330 protected:
331 virtual StateBase* objectDone(unsigned numProperties, Serializer&) overr ide;
332
333 private:
334 uint32_t m_arrayIndex;
335 uint32_t m_arrayLength;
336 };
337
338 class SparseArrayState final : public AbstractObjectState {
339 public:
340 SparseArrayState(v8::Handle<v8::Array> array, v8::Handle<v8::Array> prop ertyNames, StateBase* next, v8::Isolate* isolate)
341 : AbstractObjectState(array, next)
342 {
343 m_propertyNames = v8::Local<v8::Array>::New(isolate, propertyNames);
344 }
345
346 virtual StateBase* advance(Serializer&) override;
347
348 protected:
349 virtual StateBase* objectDone(unsigned numProperties, Serializer&) overr ide;
350 };
351
352 private:
353 StateBase* push(StateBase* state)
354 {
355 ASSERT(state);
356 ++m_depth;
357 return checkComposite(state) ? state : handleError(InputError, "Value be ing cloned is either cyclic or too deeply nested.", state);
358 }
359
360 StateBase* pop(StateBase* state)
361 {
362 ASSERT(state);
363 --m_depth;
364 StateBase* next = state->nextState();
365 delete state;
366 return next;
367 }
368
369 bool checkComposite(StateBase* top);
370 void writeString(v8::Handle<v8::Value>);
371 void writeStringObject(v8::Handle<v8::Value>);
372 void writeNumberObject(v8::Handle<v8::Value>);
373 void writeBooleanObject(v8::Handle<v8::Value>);
374 StateBase* writeBlob(v8::Handle<v8::Value>, StateBase* next);
375 StateBase* writeDOMFileSystem(v8::Handle<v8::Value>, StateBase* next);
376 StateBase* writeFile(v8::Handle<v8::Value>, StateBase* next);
377 StateBase* writeFileList(v8::Handle<v8::Value>, StateBase* next);
378 bool writeCryptoKey(v8::Handle<v8::Value>);
379 void writeImageData(v8::Handle<v8::Value>);
380 void writeRegExp(v8::Handle<v8::Value>);
381 StateBase* writeAndGreyArrayBufferView(v8::Handle<v8::Object>, StateBase* ne xt);
382 StateBase* writeArrayBuffer(v8::Handle<v8::Value>, StateBase* next);
383 StateBase* writeTransferredArrayBuffer(v8::Handle<v8::Value>, uint32_t index , StateBase* next);
384 static bool shouldSerializeDensely(uint32_t length, uint32_t propertyCount);
385
386 StateBase* startArrayState(v8::Handle<v8::Array>, StateBase* next);
387 StateBase* startObjectState(v8::Handle<v8::Object>, StateBase* next);
388
389 // Marks object as having been visited by the serializer and assigns it a un ique object reference ID.
390 // An object may only be greyed once.
391 void greyObject(const v8::Handle<v8::Object>&);
392 bool appendBlobInfo(const String& uuid, const String& type, unsigned long lo ng size, int* index);
393 bool appendFileInfo(const File*, int* index);
394
395 protected:
396 StateBase* handleError(Status errorStatus, const String& message, StateBase* );
397
398 Writer& writer() { return m_writer; }
399 uint32_t nextObjectReference() const { return m_nextObjectReference; }
400
401 private:
402 RefPtr<ScriptState> m_scriptState;
403 Writer& m_writer;
404 v8::TryCatch& m_tryCatch;
405 int m_depth;
406 Status m_status;
407 String m_errorMessage;
408 typedef V8ObjectMap<v8::Object, uint32_t> ObjectPool;
409 ObjectPool m_objectPool;
410 ObjectPool m_transferredMessagePorts;
411 ObjectPool m_transferredArrayBuffers;
412 uint32_t m_nextObjectReference;
413 WebBlobInfoArray* m_blobInfo;
414 BlobDataHandleMap& m_blobDataHandles;
415 };
416
417 // Interface used by Reader to create objects of composite types.
418 class CompositeCreator {
419 STACK_ALLOCATED();
420 WTF_MAKE_NONCOPYABLE(CompositeCreator);
421 public:
422 CompositeCreator() { }
423 virtual ~CompositeCreator() { }
424
425 virtual bool consumeTopOfStack(v8::Handle<v8::Value>*) = 0;
426 virtual uint32_t objectReferenceCount() = 0;
427 virtual void pushObjectReference(const v8::Handle<v8::Value>&) = 0;
428 virtual bool tryGetObjectFromObjectReference(uint32_t reference, v8::Handle< v8::Value>*) = 0;
429 virtual bool tryGetTransferredMessagePort(uint32_t index, v8::Handle<v8::Val ue>*) = 0;
430 virtual bool tryGetTransferredArrayBuffer(uint32_t index, v8::Handle<v8::Val ue>*) = 0;
431 virtual bool newSparseArray(uint32_t length) = 0;
432 virtual bool newDenseArray(uint32_t length) = 0;
433 virtual bool newObject() = 0;
434 virtual bool completeObject(uint32_t numProperties, v8::Handle<v8::Value>*) = 0;
435 virtual bool completeSparseArray(uint32_t numProperties, uint32_t length, v8 ::Handle<v8::Value>*) = 0;
436 virtual bool completeDenseArray(uint32_t numProperties, uint32_t length, v8: :Handle<v8::Value>*) = 0;
437 };
438
439 // Reader is responsible for deserializing primitive types and
440 // restoring information about saved objects of composite types.
441 class Reader {
442 STACK_ALLOCATED();
443 WTF_MAKE_NONCOPYABLE(Reader);
444 public:
445 Reader(const uint8_t* buffer, int length, const WebBlobInfoArray* blobInfo, BlobDataHandleMap& blobDataHandles, ScriptState* scriptState)
446 : m_scriptState(scriptState)
447 , m_buffer(buffer)
448 , m_length(length)
449 , m_position(0)
450 , m_version(0)
451 , m_blobInfo(blobInfo)
452 , m_blobDataHandles(blobDataHandles)
453 {
454 ASSERT(!(reinterpret_cast<size_t>(buffer) & 1));
455 ASSERT(length >= 0);
456 }
457
458 bool isEof() const { return m_position >= m_length; }
459
460 ScriptState* scriptState() const { return m_scriptState.get(); }
461
462 protected:
463 v8::Isolate* isolate() const { return m_scriptState->isolate(); }
464 unsigned length() const { return m_length; }
465 unsigned position() const { return m_position; }
466
467 const uint8_t* allocate(uint32_t size)
468 {
469 const uint8_t* allocated = m_buffer + m_position;
470 m_position += size;
471 return allocated;
472 }
473
474 public:
475 bool read(v8::Handle<v8::Value>*, CompositeCreator&);
476 bool readVersion(uint32_t& version);
477 void setVersion(uint32_t);
478
479 private:
480 bool readTag(SerializationTag*);
481 bool readWebCoreString(String*);
482 bool readUint32(v8::Handle<v8::Value>*);
483 void undoReadTag();
484 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*);
485 bool readString(v8::Handle<v8::Value>*);
486 bool readUCharString(v8::Handle<v8::Value>*);
487 bool readStringObject(v8::Handle<v8::Value>*);
488 bool readInt32(v8::Handle<v8::Value>*);
489 bool readDate(v8::Handle<v8::Value>*);
490 bool readNumber(v8::Handle<v8::Value>*);
491 bool readNumberObject(v8::Handle<v8::Value>*);
492 bool readImageData(v8::Handle<v8::Value>*);
493 PassRefPtr<ArrayBuffer> doReadArrayBuffer();
494 bool readArrayBuffer(v8::Handle<v8::Value>*);
495 bool readArrayBufferView(v8::Handle<v8::Value>*, CompositeCreator&);
496 bool readRegExp(v8::Handle<v8::Value>*);
497 bool readBlob(v8::Handle<v8::Value>*, bool isIndexed);
498 bool readDOMFileSystem(v8::Handle<v8::Value>*);
499 bool readFile(v8::Handle<v8::Value>*, bool isIndexed);
500 bool readFileList(v8::Handle<v8::Value>*, bool isIndexed);
501 bool readCryptoKey(v8::Handle<v8::Value>*);
502 File* readFileHelper();
503 File* readFileIndexHelper();
504
505 template<class T>
506 bool doReadUintHelper(T* value)
507 {
508 *value = 0;
509 uint8_t currentByte;
510 int shift = 0;
511 do {
512 if (m_position >= m_length)
513 return false;
514 currentByte = m_buffer[m_position++];
515 *value |= ((currentByte & SerializedScriptValue::varIntMask) << shif t);
516 shift += SerializedScriptValue::varIntShift;
517 } while (currentByte & (1 << SerializedScriptValue::varIntShift));
518 return true;
519 }
520
521 bool doReadUint32(uint32_t* value);
522 bool doReadUint64(uint64_t* value);
523 bool doReadNumber(double* number);
524 PassRefPtr<BlobDataHandle> getOrCreateBlobDataHandle(const String& uuid, con st String& type, long long size = -1);
525 bool doReadHmacKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&);
526 bool doReadAesKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&);
527 bool doReadRsaHashedKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&);
528 bool doReadAlgorithmId(WebCryptoAlgorithmId&);
529 bool doReadKeyUsages(WebCryptoKeyUsageMask& usages, bool& extractable);
530
531 private:
532 RefPtr<ScriptState> m_scriptState;
533 const uint8_t* m_buffer;
534 const unsigned m_length;
535 unsigned m_position;
536 uint32_t m_version;
537 const WebBlobInfoArray* m_blobInfo;
538 const BlobDataHandleMap& m_blobDataHandles;
539 };
540
541 class Deserializer : public CompositeCreator {
542 STACK_ALLOCATED();
543 WTF_MAKE_NONCOPYABLE(Deserializer);
544 public:
545 Deserializer(Reader& reader, MessagePortArray* messagePorts, ArrayBufferCont entsArray* arrayBufferContents)
546 : m_reader(reader)
547 , m_transferredMessagePorts(messagePorts)
548 , m_arrayBufferContents(arrayBufferContents)
549 , m_arrayBuffers(arrayBufferContents ? arrayBufferContents->size() : 0)
550 , m_version(0)
551 {
552 }
553
554 v8::Handle<v8::Value> deserialize();
555 virtual bool newSparseArray(uint32_t) override;
556 virtual bool newDenseArray(uint32_t length) override;
557 virtual bool consumeTopOfStack(v8::Handle<v8::Value>*) override;
558 virtual bool newObject() override;
559 virtual bool completeObject(uint32_t numProperties, v8::Handle<v8::Value>*) override;
560 virtual bool completeSparseArray(uint32_t numProperties, uint32_t length, v8 ::Handle<v8::Value>*) override;
561 virtual bool completeDenseArray(uint32_t numProperties, uint32_t length, v8: :Handle<v8::Value>*) override;
562 virtual void pushObjectReference(const v8::Handle<v8::Value>&) override;
563 virtual bool tryGetTransferredMessagePort(uint32_t index, v8::Handle<v8::Val ue>*) override;
564 virtual bool tryGetTransferredArrayBuffer(uint32_t index, v8::Handle<v8::Val ue>*) override;
565 virtual bool tryGetObjectFromObjectReference(uint32_t reference, v8::Handle< v8::Value>*) override;
566 virtual uint32_t objectReferenceCount() override;
567
568 protected:
569 Reader& reader() { return m_reader; }
570 bool read(v8::Local<v8::Value>*);
571
572 private:
573 bool initializeObject(v8::Handle<v8::Object>, uint32_t numProperties, v8::Ha ndle<v8::Value>*);
574 bool doDeserialize();
575 void push(v8::Local<v8::Value> value) { m_stack.append(value); };
576 void pop(unsigned length)
577 {
578 ASSERT(length <= m_stack.size());
579 m_stack.shrink(m_stack.size() - length);
580 }
581 unsigned stackDepth() const { return m_stack.size(); }
582
583 v8::Local<v8::Value> element(unsigned index);
584 void openComposite(const v8::Local<v8::Value>&);
585 bool closeComposite(v8::Handle<v8::Value>*);
586
587 Reader& m_reader;
588 Vector<v8::Local<v8::Value> > m_stack;
589 Vector<v8::Handle<v8::Value> > m_objectPool;
590 Vector<uint32_t> m_openCompositeReferenceStack;
591 RawPtrWillBeMember<MessagePortArray> m_transferredMessagePorts;
592 ArrayBufferContentsArray* m_arrayBufferContents;
593 Vector<v8::Handle<v8::Object> > m_arrayBuffers;
594 uint32_t m_version;
595 };
596
597 } // namespace SerializedScriptValueInternal
598
599 } // namespace blink
600
601 #endif // ScriptValueSerializer_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | Source/bindings/core/v8/SerializedScriptValue.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698