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

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

Issue 1893983002: Simplify handling of Transferable objects while (de)serializing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove Transferable.cpp, not needed after all. Created 4 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Maximum allowed value is 255 66 // Maximum allowed value is 255
67 }; 67 };
68 68
69 enum AssymetricCryptoKeyType { 69 enum AssymetricCryptoKeyType {
70 PublicKeyType = 1, 70 PublicKeyType = 1,
71 PrivateKeyType = 2, 71 PrivateKeyType = 2,
72 // Maximum allowed value is 2^32-1 72 // Maximum allowed value is 2^32-1
73 }; 73 };
74 74
75 75
76 ScriptValueSerializerForModules::ScriptValueSerializerForModules(SerializedScrip tValueWriter& writer, TransferableArray* transferables, WebBlobInfoArray* blobIn fo, BlobDataHandleMap& blobDataHandles, v8::TryCatch& tryCatch, ScriptState* scr iptState) 76 ScriptValueSerializerForModules::ScriptValueSerializerForModules(SerializedScrip tValueWriter& writer, const Transferables* transferables, WebBlobInfoArray* blob Info, BlobDataHandleMap& blobDataHandles, v8::TryCatch& tryCatch, ScriptState* s criptState)
77 : ScriptValueSerializer(writer, transferables, blobInfo, blobDataHandles, tr yCatch, scriptState) 77 : ScriptValueSerializer(writer, transferables, blobInfo, blobDataHandles, tr yCatch, scriptState)
78 { 78 {
79 } 79 }
80 80
81 ScriptValueSerializer::StateBase* ScriptValueSerializerForModules::writeDOMFileS ystem(v8::Local<v8::Value> value, ScriptValueSerializer::StateBase* next) 81 ScriptValueSerializer::StateBase* ScriptValueSerializerForModules::writeDOMFileS ystem(v8::Local<v8::Value> value, ScriptValueSerializer::StateBase* next)
82 { 82 {
83 DOMFileSystem* fs = V8DOMFileSystem::toImpl(value.As<v8::Object>()); 83 DOMFileSystem* fs = V8DOMFileSystem::toImpl(value.As<v8::Object>());
84 if (!fs) 84 if (!fs)
85 return 0; 85 return 0;
86 if (!fs->clonable()) 86 if (!fs->clonable())
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 : ScriptValueDeserializer(reader, messagePorts, arrayBufferContents, imageBi tmapContents) 627 : ScriptValueDeserializer(reader, messagePorts, arrayBufferContents, imageBi tmapContents)
628 { 628 {
629 } 629 }
630 630
631 bool ScriptValueDeserializerForModules::read(v8::Local<v8::Value>* value) 631 bool ScriptValueDeserializerForModules::read(v8::Local<v8::Value>* value)
632 { 632 {
633 return toSerializedScriptValueReaderForModules(reader()).read(value, *this); 633 return toSerializedScriptValueReaderForModules(reader()).read(value, *this);
634 } 634 }
635 635
636 } // namespace blink 636 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698