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

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

Issue 1413723004: Revert of Make ImageBitmap Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/ScriptValueSerializer.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h
index e2cf001a375ce526879a26bf17d542e158ca56e3..3b2bb63b4e6f562c4e63045a2ff654178ae406b5 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h
@@ -9,7 +9,6 @@
#include "bindings/core/v8/SerializedScriptValue.h"
#include "bindings/core/v8/V8Binding.h"
#include "core/CoreExport.h"
-#include "core/frame/ImageBitmap.h"
#include "wtf/ArrayBufferContents.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
@@ -25,7 +24,6 @@
class DOMSharedArrayBuffer;
class File;
class FileList;
-class ImageBitmap;
typedef Vector<WTF::ArrayBufferContents, 1> ArrayBufferContentsArray;
@@ -139,7 +137,6 @@
void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags);
void writeTransferredMessagePort(uint32_t index);
void writeTransferredArrayBuffer(uint32_t index);
- void writeTransferredImageBitmap(uint32_t index);
void writeTransferredSharedArrayBuffer(uint32_t index);
void writeObjectReference(uint32_t reference);
void writeObject(uint32_t numProperties);
@@ -205,7 +202,7 @@
JSException
};
- ScriptValueSerializer(SerializedScriptValueWriter&, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, ImageBitmapArray* imageBitmaps, WebBlobInfoArray*, BlobDataHandleMap& blobDataHandles, v8::TryCatch&, ScriptState*);
+ ScriptValueSerializer(SerializedScriptValueWriter&, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, WebBlobInfoArray*, BlobDataHandleMap& blobDataHandles, v8::TryCatch&, ScriptState*);
v8::Isolate* isolate() { return m_scriptState->isolate(); }
v8::Local<v8::Context> context() { return m_scriptState->context(); }
@@ -404,7 +401,6 @@
StateBase* writeAndGreyArrayBufferView(v8::Local<v8::Object>, StateBase* next);
StateBase* writeArrayBuffer(v8::Local<v8::Value>, StateBase* next);
StateBase* writeTransferredArrayBuffer(v8::Local<v8::Value>, uint32_t index, StateBase* next);
- StateBase* writeTransferredImageBitmap(v8::Local<v8::Value>, uint32_t index, StateBase* next);
StateBase* writeTransferredSharedArrayBuffer(v8::Local<v8::Value>, uint32_t index, StateBase* next);
static bool shouldSerializeDensely(uint32_t length, uint32_t propertyCount);
@@ -437,7 +433,6 @@
ObjectPool m_objectPool;
ObjectPool m_transferredMessagePorts;
ObjectPool m_transferredArrayBuffers;
- ObjectPool m_transferredImageBitmaps;
uint32_t m_nextObjectReference;
WebBlobInfoArray* m_blobInfo;
BlobDataHandleMap& m_blobDataHandles;
@@ -457,7 +452,6 @@
virtual bool tryGetObjectFromObjectReference(uint32_t reference, v8::Local<v8::Value>*) = 0;
virtual bool tryGetTransferredMessagePort(uint32_t index, v8::Local<v8::Value>*) = 0;
virtual bool tryGetTransferredArrayBuffer(uint32_t index, v8::Local<v8::Value>*) = 0;
- virtual bool tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>*) = 0;
virtual bool tryGetTransferredSharedArrayBuffer(uint32_t index, v8::Local<v8::Value>*) = 0;
virtual bool newSparseArray(uint32_t length) = 0;
virtual bool newDenseArray(uint32_t length) = 0;
@@ -577,11 +571,10 @@
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(ScriptValueDeserializer);
public:
- ScriptValueDeserializer(SerializedScriptValueReader& reader, MessagePortArray* messagePorts, ArrayBufferContentsArray* arrayBufferContents, ImageBitmapArray* imageBitmaps)
+ ScriptValueDeserializer(SerializedScriptValueReader& reader, MessagePortArray* messagePorts, ArrayBufferContentsArray* arrayBufferContents)
: m_reader(reader)
, m_transferredMessagePorts(messagePorts)
, m_arrayBufferContents(arrayBufferContents)
- , m_imageBitmaps(imageBitmaps)
, m_arrayBuffers(arrayBufferContents ? arrayBufferContents->size() : 0)
, m_version(0)
{
@@ -602,7 +595,6 @@
void pushObjectReference(const v8::Local<v8::Value>&) override;
bool tryGetTransferredMessagePort(uint32_t index, v8::Local<v8::Value>*) override;
bool tryGetTransferredArrayBuffer(uint32_t index, v8::Local<v8::Value>*) override;
- bool tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>*) override;
bool tryGetTransferredSharedArrayBuffer(uint32_t index, v8::Local<v8::Value>*) override;
bool tryGetObjectFromObjectReference(uint32_t reference, v8::Local<v8::Value>*) override;
uint32_t objectReferenceCount() override;
@@ -630,10 +622,8 @@
Vector<v8::Local<v8::Value>> m_stack;
Vector<v8::Local<v8::Value>> m_objectPool;
Vector<uint32_t> m_openCompositeReferenceStack;
- // TODO(xidachen): Oilpan, turn these optional heap vector objects into proper fields.
MessagePortArray* m_transferredMessagePorts;
ArrayBufferContentsArray* m_arrayBufferContents;
- ImageBitmapArray* m_imageBitmaps;
Vector<v8::Local<v8::Value>> m_arrayBuffers;
uint32_t m_version;
};

Powered by Google App Engine
This is Rietveld 408576698