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

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

Issue 1862033002: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no need to register, taking the same approach as extractTransferables 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h
diff --git a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h
index 4d929db5688ded0556dfdebc382dae9935d616f5..44826bd1963953e78d61a63e4f1b8f66b6c019bd 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h
+++ b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h
@@ -23,6 +23,7 @@ public:
}
void writeDOMFileSystem(int type, const String& name, const String& url);
+ void writeTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_t height, uint32_t id);
bool writeCryptoKey(const WebCryptoKey&);
private:
@@ -70,13 +71,17 @@ class ScriptValueSerializerForModules final : public ScriptValueSerializer {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(ScriptValueSerializerForModules);
public:
- ScriptValueSerializerForModules(SerializedScriptValueWriter&, const Transferables*, WebBlobInfoArray*, BlobDataHandleMap&, v8::TryCatch&, ScriptState*);
+ ScriptValueSerializerForModules(SerializedScriptValueWriter&, Transferables*, WebBlobInfoArray*, BlobDataHandleMap&, v8::TryCatch&, ScriptState*);
private:
ScriptValueSerializer::StateBase* doSerializeValue(v8::Local<v8::Value>, ScriptValueSerializer::StateBase* next) override;
ScriptValueSerializer::StateBase* writeDOMFileSystem(v8::Local<v8::Value>, ScriptValueSerializer::StateBase* next);
+ ScriptValueSerializer::StateBase* writeTransferredOffscreenCanvas(v8::Local<v8::Value>, uint32_t index, ScriptValueSerializer::StateBase* next);
bool writeCryptoKey(v8::Local<v8::Value>);
+ typedef V8ObjectMap<v8::Object, uint32_t> ObjectPool;
+ ObjectPool m_transferredOffscreenCanvas;
+ SerializedScriptValueWriter& m_writer;
};
class ScriptValueDeserializerForModules final : public ScriptValueDeserializer {
@@ -84,9 +89,11 @@ class ScriptValueDeserializerForModules final : public ScriptValueDeserializer {
WTF_MAKE_NONCOPYABLE(ScriptValueDeserializerForModules);
public:
ScriptValueDeserializerForModules(SerializedScriptValueReaderForModules&, MessagePortArray* messagePorts, ArrayBufferContentsArray*, ImageBitmapContentsArray*);
+ bool tryGetTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_t height, uint32_t id, v8::Local<v8::Value>*) override;
private:
bool read(v8::Local<v8::Value>*) override;
+ SerializedScriptValueReader& m_reader;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698