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

Unified Diff: Source/bindings/v8/SerializedScriptValue.h

Issue 18590006: Blob support for IDB [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: small cleanup Created 7 years 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: Source/bindings/v8/SerializedScriptValue.h
diff --git a/Source/bindings/v8/SerializedScriptValue.h b/Source/bindings/v8/SerializedScriptValue.h
index e4ba351339da25d9ae78fb1c99f2a7440cfdb2e2..aac965bf4c67514a7db049ff9e8a93624159c978 100644
--- a/Source/bindings/v8/SerializedScriptValue.h
+++ b/Source/bindings/v8/SerializedScriptValue.h
@@ -32,7 +32,6 @@
#define SerializedScriptValue_h
#include "bindings/v8/ScriptValue.h"
-
#include "wtf/HashMap.h"
#include "wtf/ThreadSafeRefCounted.h"
#include <v8.h>
@@ -47,6 +46,7 @@ class ArrayBufferContents;
namespace WebCore {
class BlobDataHandle;
+class BlobInfo;
class MessagePort;
typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray;
@@ -68,13 +68,13 @@ public:
// the caller must not invoke any V8 operations until control returns to
// V8. When serialization is successful, |didThrow| is false.
static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, bool& didThrow, v8::Isolate*);
+ static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, Vector<BlobInfo>*, bool& didThrow, v8::Isolate*);
static PassRefPtr<SerializedScriptValue> createFromWire(const String&);
static PassRefPtr<SerializedScriptValue> createFromWireBytes(const Vector<uint8_t>&);
static PassRefPtr<SerializedScriptValue> create(const String&);
static PassRefPtr<SerializedScriptValue> create(const String&, v8::Isolate*);
static PassRefPtr<SerializedScriptValue> create();
-
- static PassRefPtr<SerializedScriptValue> create(const ScriptValue&, bool& didThrow, ScriptState*);
+ static PassRefPtr<SerializedScriptValue> create(const ScriptValue&, Vector<BlobInfo>*, bool& didThrow, ScriptState*);
// Never throws exceptions.
static PassRefPtr<SerializedScriptValue> createAndSwallowExceptions(v8::Handle<v8::Value>, v8::Isolate*);
@@ -88,11 +88,8 @@ public:
// Deserializes the value (in the current context). Returns a null value in
// case of failure.
v8::Handle<v8::Value> deserialize(MessagePortArray* = 0);
- v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0);
-
- // Only reflects the truth if the SSV was created by walking a v8 value, not reliable
- // if the SSV was created createdFromWire(data).
- bool containsBlobs() const { return !m_blobDataHandles.isEmpty(); }
+ v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0, const
+ Vector<BlobInfo>* = 0);
// 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.
@@ -112,7 +109,7 @@ private:
typedef Vector<WTF::ArrayBufferContents, 1> ArrayBufferContentsArray;
SerializedScriptValue();
- SerializedScriptValue(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, bool& didThrow, v8::Isolate*, ExceptionPolicy = ThrowExceptions);
+ SerializedScriptValue(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, Vector<BlobInfo>*, bool& didThrow, v8::Isolate*, ExceptionPolicy = ThrowExceptions);
explicit SerializedScriptValue(const String& wireData);
static PassOwnPtr<ArrayBufferContentsArray> transferArrayBuffers(ArrayBufferArray&, bool& didThrow, v8::Isolate*);

Powered by Google App Engine
This is Rietveld 408576698