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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp

Issue 2009233002: [Binding] [Refactoring] Remove ScriptValueCompositeCreator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "bindings/modules/v8/ScriptValueSerializerForModules.h" 5 #include "bindings/modules/v8/ScriptValueSerializerForModules.h"
6 6
7 #include "bindings/core/v8/SerializationTag.h" 7 #include "bindings/core/v8/SerializationTag.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/modules/v8/V8CryptoKey.h" 9 #include "bindings/modules/v8/V8CryptoKey.h"
10 #include "bindings/modules/v8/V8DOMFileSystem.h" 10 #include "bindings/modules/v8/V8DOMFileSystem.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 return nullptr; 327 return nullptr;
328 } 328 }
329 if (V8RTCCertificate::hasInstance(jsObject, isolate())) { 329 if (V8RTCCertificate::hasInstance(jsObject, isolate())) {
330 greyObject(jsObject); 330 greyObject(jsObject);
331 return writeRTCCertificate(jsObject, next); 331 return writeRTCCertificate(jsObject, next);
332 } 332 }
333 333
334 return ScriptValueSerializer::doSerializeObject(jsObject, next); 334 return ScriptValueSerializer::doSerializeObject(jsObject, next);
335 } 335 }
336 336
337 bool SerializedScriptValueReaderForModules::read(v8::Local<v8::Value>* value, Sc riptValueCompositeCreator& creator) 337 bool SerializedScriptValueReaderForModules::read(v8::Local<v8::Value>* value, Sc riptValueDeserializer& deserializer)
338 { 338 {
339 SerializationTag tag; 339 SerializationTag tag;
340 if (!readTag(&tag)) 340 if (!readTag(&tag))
341 return false; 341 return false;
342 switch (tag) { 342 switch (tag) {
343 case DOMFileSystemTag: 343 case DOMFileSystemTag:
344 if (!readDOMFileSystem(value)) 344 if (!readDOMFileSystem(value))
345 return false; 345 return false;
346 creator.pushObjectReference(*value); 346 deserializer.pushObjectReference(*value);
347 break; 347 break;
348 case CryptoKeyTag: 348 case CryptoKeyTag:
349 if (!readCryptoKey(value)) 349 if (!readCryptoKey(value))
350 return false; 350 return false;
351 creator.pushObjectReference(*value); 351 deserializer.pushObjectReference(*value);
352 break; 352 break;
353 case RTCCertificateTag: 353 case RTCCertificateTag:
354 if (!readRTCCertificate(value)) 354 if (!readRTCCertificate(value))
355 return false; 355 return false;
356 creator.pushObjectReference(*value); 356 deserializer.pushObjectReference(*value);
357 break; 357 break;
358 default: 358 default:
359 return SerializedScriptValueReader::readWithTag(tag, value, creator); 359 return SerializedScriptValueReader::readWithTag(tag, value, deserializer );
360 } 360 }
361 return !value->IsEmpty(); 361 return !value->IsEmpty();
362 } 362 }
363 363
364 bool SerializedScriptValueReaderForModules::readDOMFileSystem(v8::Local<v8::Valu e>* value) 364 bool SerializedScriptValueReaderForModules::readDOMFileSystem(v8::Local<v8::Valu e>* value)
365 { 365 {
366 uint32_t type; 366 uint32_t type;
367 String name; 367 String name;
368 String url; 368 String url;
369 if (!doReadUint32(&type)) 369 if (!doReadUint32(&type))
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 : ScriptValueDeserializer(reader, messagePorts, arrayBufferContents, imageBi tmapContents) 679 : ScriptValueDeserializer(reader, messagePorts, arrayBufferContents, imageBi tmapContents)
680 { 680 {
681 } 681 }
682 682
683 bool ScriptValueDeserializerForModules::read(v8::Local<v8::Value>* value) 683 bool ScriptValueDeserializerForModules::read(v8::Local<v8::Value>* value)
684 { 684 {
685 return toSerializedScriptValueReaderForModules(reader()).read(value, *this); 685 return toSerializedScriptValueReaderForModules(reader()).read(value, *this);
686 } 686 }
687 687
688 } // namespace blink 688 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698