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

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

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 8 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: WebCore/bindings/v8/SerializedScriptValue.h
===================================================================
--- WebCore/bindings/v8/SerializedScriptValue.h (revision 132804)
+++ WebCore/bindings/v8/SerializedScriptValue.h (working copy)
@@ -38,10 +38,12 @@
namespace WebCore {
+class BlobDataHandle;
class MessagePort;
typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray;
typedef Vector<RefPtr<WTF::ArrayBuffer>, 1> ArrayBufferArray;
+typedef Vector<RefPtr<BlobDataHandle>, 1> BlobDataHandleArray;
class SerializedScriptValue : public ThreadSafeRefCounted<SerializedScriptValue> {
public:
@@ -77,7 +79,7 @@
ScriptValue deserializeForInspector(ScriptState*, v8::Isolate* = 0);
#endif
- const Vector<String>& blobURLs() const { return m_blobURLs; }
+ 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.
@@ -86,10 +88,6 @@
void registerMemoryAllocatedWithCurrentScriptContext();
private:
- enum StringDataMode {
- StringValue,
- WireData
- };
typedef Vector<WTF::ArrayBufferContents, 1> ArrayBufferContentsArray;
SerializedScriptValue();
@@ -100,7 +98,7 @@
String m_data;
OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray;
- Vector<String> m_blobURLs;
+ BlobDataHandleArray m_blobDataHandles; // TODO: Does this generalize better? SerializedScriptValue::ExtraData??
intptr_t m_externallyAllocatedMemory;
};

Powered by Google App Engine
This is Rietveld 408576698