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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
index f3e130dd77e262b1f9fbf7dcecb7e9842ec71e85..259a22ee5bcdd888ebb1d87165ff089ea850957f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
@@ -32,7 +32,7 @@
#define SerializedScriptValue_h
#include "bindings/core/v8/ScriptValue.h"
-#include "bindings/core/v8/Transferable.h"
+#include "bindings/core/v8/Transferables.h"
#include "core/CoreExport.h"
#include "wtf/HashMap.h"
#include "wtf/ThreadSafeRefCounted.h"
@@ -47,17 +47,13 @@ class ArrayBufferContents;
namespace blink {
class BlobDataHandle;
+class Transferables;
class ExceptionState;
class StaticBitmapImage;
-class TransferableArrayBuffer;
-class TransferableImageBitmap;
-class MessagePort;
class WebBlobInfo;
-typedef HeapVector<Member<MessagePort>, 1> MessagePortArray;
typedef HashMap<String, RefPtr<BlobDataHandle>> BlobDataHandleMap;
typedef Vector<WebBlobInfo> WebBlobInfoArray;
-typedef HeapVector<Member<Transferable>> TransferableArray;
class CORE_EXPORT SerializedScriptValue : public ThreadSafeRefCounted<SerializedScriptValue> {
public:
@@ -92,7 +88,7 @@ public:
// Also validates the elements per sections 4.1.13 and 4.1.15 of the WebIDL spec and section 8.3.3
// of the HTML5 spec and generates exceptions as appropriate.
// Returns true if the array was filled, or false if the passed value was not of an appropriate type.
- static bool extractTransferables(v8::Isolate*, v8::Local<v8::Value>, int, TransferableArray&, ExceptionState&);
+ static bool extractTransferables(v8::Isolate*, v8::Local<v8::Value>, int, Transferables&, ExceptionState&);
// Informs the V8 about external memory allocated and owned by this object. Large values should contribute
// to GC counters to eventually trigger a GC, otherwise flood of postMessage() can cause OOM.
@@ -118,14 +114,11 @@ private:
BlobDataHandleMap& blobDataHandles() { return m_blobDataHandles; }
String& data() { return m_data; }
void setData(const String& data) { m_data = data; }
- void transferArrayBuffers(v8::Isolate*, TransferableArrayBuffer*, ExceptionState&);
- void transferImageBitmaps(v8::Isolate*, TransferableImageBitmap*, ExceptionState&);
+ void transferArrayBuffers(v8::Isolate*, const ArrayBufferArray&, ExceptionState&);
+ void transferImageBitmaps(v8::Isolate*, const ImageBitmapArray&, ExceptionState&);
ArrayBufferContentsArray* getArrayBufferContentsArray() { return m_arrayBufferContentsArray.get(); }
ImageBitmapContentsArray* getImageBitmapContentsArray() { return m_imageBitmapContentsArray.get(); }
- static PassOwnPtr<ArrayBufferContentsArray> createArrayBuffers(v8::Isolate*, TransferableArrayBuffer*, ExceptionState&);
- static PassOwnPtr<ImageBitmapContentsArray> createImageBitmaps(v8::Isolate*, TransferableImageBitmap*, ExceptionState&);
-
private:
String m_data;
OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray;

Powered by Google App Engine
This is Rietveld 408576698