Index: Source/bindings/v8/SerializedScriptValue.h |
diff --git a/Source/bindings/v8/SerializedScriptValue.h b/Source/bindings/v8/SerializedScriptValue.h |
index b959ae158b51d29edeedf8e603ebadd52f3c2bd4..0d4f046f684fbae7fc2ea926b4cd7e7024077ea4 100644 |
--- a/Source/bindings/v8/SerializedScriptValue.h |
+++ b/Source/bindings/v8/SerializedScriptValue.h |
@@ -33,6 +33,7 @@ |
#include "bindings/v8/ScriptValue.h" |
+#include "wtf/HashMap.h" |
#include "wtf/ThreadSafeRefCounted.h" |
#include <v8.h> |
@@ -45,10 +46,12 @@ class ArrayBufferContents; |
namespace WebCore { |
+class BlobDataHandle; |
class MessagePort; |
typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray; |
typedef Vector<RefPtr<WTF::ArrayBuffer>, 1> ArrayBufferArray; |
+typedef HashMap<String, RefPtr<BlobDataHandle> > BlobDataHandleMap; |
class SerializedScriptValue : public ThreadSafeRefCounted<SerializedScriptValue> { |
public: |
@@ -93,7 +96,9 @@ public: |
ScriptValue deserializeForInspector(ScriptState*); |
- const Vector<String>& blobURLs() const { return m_blobURLs; } |
+ // 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(); } |
// 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. |
@@ -120,7 +125,7 @@ private: |
String m_data; |
OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; |
- Vector<String> m_blobURLs; |
+ BlobDataHandleMap m_blobDataHandles; |
intptr_t m_externallyAllocatedMemory; |
}; |