Chromium Code Reviews| Index: Source/bindings/v8/SerializedScriptValue.h |
| diff --git a/Source/bindings/v8/SerializedScriptValue.h b/Source/bindings/v8/SerializedScriptValue.h |
| index b959ae158b51d29edeedf8e603ebadd52f3c2bd4..14a01885d07f1a56fde4e478eb587af2c0873ba8 100644 |
| --- a/Source/bindings/v8/SerializedScriptValue.h |
| +++ b/Source/bindings/v8/SerializedScriptValue.h |
| @@ -31,6 +31,7 @@ |
| #ifndef SerializedScriptValue_h |
| #define SerializedScriptValue_h |
| +#include "bindings/v8/BlobInfo.h" |
| #include "bindings/v8/ScriptValue.h" |
| #include "wtf/ThreadSafeRefCounted.h" |
| @@ -59,7 +60,9 @@ public: |
| // be thrown using v8::ThrowException(), and sets |didThrow|. In this case |
| // 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*); |
|
jsbell
2013/09/12 22:52:17
For symmetry, a with MessagePortArray and ArrayBuf
ericu
2013/11/20 23:06:08
Huh. That won't compile, despite being identical.
|
| + static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, Vector<BlobInfo>*, bool&); |
| + static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, MessagePortArray*, ArrayBufferArray*, bool&, v8::Isolate*); |
| static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, v8::Isolate*); |
| static PassRefPtr<SerializedScriptValue> createFromWire(const String&); |
| static PassRefPtr<SerializedScriptValue> createFromWireBytes(const Vector<uint8_t>&); |
| @@ -89,11 +92,13 @@ 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); |
| + v8::Handle<v8::Value> deserialize(const Vector<BlobInfo>*); |
| + v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0, const |
| + Vector<BlobInfo>* = 0); |
| ScriptValue deserializeForInspector(ScriptState*); |
| - const Vector<String>& blobURLs() const { return m_blobURLs; } |
| + const Vector<BlobInfo>* blobInfo() const { return m_blobInfo; } |
|
jsbell
2013/09/12 22:52:17
So far as I can tell, this is only used in a DCHEC
ericu
2013/11/20 23:06:08
Yup! Done.
|
| // 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. |
| @@ -113,14 +118,14 @@ 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*); |
| String m_data; |
| OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; |
| - Vector<String> m_blobURLs; |
| + Vector<BlobInfo> *m_blobInfo; |
| intptr_t m_externallyAllocatedMemory; |
| }; |