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

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

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 #ifndef ScriptValueSerializerForModules_h 5 #ifndef ScriptValueSerializerForModules_h
6 #define ScriptValueSerializerForModules_h 6 #define ScriptValueSerializerForModules_h
7 7
8 #include "bindings/core/v8/ScriptValueSerializer.h" 8 #include "bindings/core/v8/ScriptValueSerializer.h"
9 #include "public/platform/WebCrypto.h" 9 #include "public/platform/WebCrypto.h"
10 #include "public/platform/WebCryptoKey.h" 10 #include "public/platform/WebCryptoKey.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool doReadNamedCurve(WebCryptoNamedCurve&); 63 bool doReadNamedCurve(WebCryptoNamedCurve&);
64 bool doReadKeyUsages(WebCryptoKeyUsageMask& usages, bool& extractable); 64 bool doReadKeyUsages(WebCryptoKeyUsageMask& usages, bool& extractable);
65 }; 65 };
66 66
67 DEFINE_TYPE_CASTS(SerializedScriptValueReaderForModules, SerializedScriptValueRe ader, reader, true, true); 67 DEFINE_TYPE_CASTS(SerializedScriptValueReaderForModules, SerializedScriptValueRe ader, reader, true, true);
68 68
69 class ScriptValueSerializerForModules final : public ScriptValueSerializer { 69 class ScriptValueSerializerForModules final : public ScriptValueSerializer {
70 STACK_ALLOCATED(); 70 STACK_ALLOCATED();
71 WTF_MAKE_NONCOPYABLE(ScriptValueSerializerForModules); 71 WTF_MAKE_NONCOPYABLE(ScriptValueSerializerForModules);
72 public: 72 public:
73 ScriptValueSerializerForModules(SerializedScriptValueWriter&, TransferableAr ray* transferables, WebBlobInfoArray*, BlobDataHandleMap& blobDataHandles, v8::T ryCatch&, ScriptState*); 73 ScriptValueSerializerForModules(SerializedScriptValueWriter&, const Transfer ables*, WebBlobInfoArray*, BlobDataHandleMap&, v8::TryCatch&, ScriptState*);
74 74
75 private: 75 private:
76 ScriptValueSerializer::StateBase* doSerializeValue(v8::Local<v8::Value>, Scr iptValueSerializer::StateBase* next) override; 76 ScriptValueSerializer::StateBase* doSerializeValue(v8::Local<v8::Value>, Scr iptValueSerializer::StateBase* next) override;
77 77
78 ScriptValueSerializer::StateBase* writeDOMFileSystem(v8::Local<v8::Value>, S criptValueSerializer::StateBase* next); 78 ScriptValueSerializer::StateBase* writeDOMFileSystem(v8::Local<v8::Value>, S criptValueSerializer::StateBase* next);
79 bool writeCryptoKey(v8::Local<v8::Value>); 79 bool writeCryptoKey(v8::Local<v8::Value>);
80 }; 80 };
81 81
82 class ScriptValueDeserializerForModules final : public ScriptValueDeserializer { 82 class ScriptValueDeserializerForModules final : public ScriptValueDeserializer {
83 STACK_ALLOCATED(); 83 STACK_ALLOCATED();
84 WTF_MAKE_NONCOPYABLE(ScriptValueDeserializerForModules); 84 WTF_MAKE_NONCOPYABLE(ScriptValueDeserializerForModules);
85 public: 85 public:
86 ScriptValueDeserializerForModules(SerializedScriptValueReaderForModules&, Me ssagePortArray* messagePorts, ArrayBufferContentsArray*, ImageBitmapContentsArra y*); 86 ScriptValueDeserializerForModules(SerializedScriptValueReaderForModules&, Me ssagePortArray* messagePorts, ArrayBufferContentsArray*, ImageBitmapContentsArra y*);
87 87
88 private: 88 private:
89 bool read(v8::Local<v8::Value>*) override; 89 bool read(v8::Local<v8::Value>*) override;
90 }; 90 };
91 91
92 } // namespace blink 92 } // namespace blink
93 93
94 #endif // ScriptValueSerializerForModules_h 94 #endif // ScriptValueSerializerForModules_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698