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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h

Issue 2359363005: Support Blob on the V8-based structured clone path. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h
index 17929171a72ddc6e65e3960ebd442ce9d660d013..25c09d3164e5c340649e0d2409e01c06b6e959e8 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h
@@ -31,6 +31,7 @@ public:
V8ScriptValueDeserializer(RefPtr<ScriptState>, RefPtr<SerializedScriptValue>);
void setTransferredMessagePorts(const MessagePortArray* ports) { m_transferredMessagePorts = ports; }
+ void setBlobInfoArray(const WebBlobInfoArray* blobInfoArray) { m_blobInfoArray = blobInfoArray; }
v8::Local<v8::Value> deserialize();
@@ -54,6 +55,8 @@ protected:
private:
void transfer();
+ RefPtr<BlobDataHandle> getOrCreateBlobDataHandle(const String& uuid, const String& type, uint64_t size);
+
// v8::ValueDeserializer::Delegate
v8::MaybeLocal<v8::Object> ReadHostObject(v8::Isolate*) override;
@@ -67,6 +70,9 @@ private:
// ImageBitmaps which were transferred in.
HeapVector<Member<ImageBitmap>> m_transferredImageBitmaps;
+ // Blob info for blobs stored by index.
+ const WebBlobInfoArray* m_blobInfoArray = nullptr;
+
// Set during deserialize after the header is read.
uint32_t m_version = 0;
#if DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698