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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h

Issue 2414333003: WebMessaging: Send transferable ArrayBuffers by copy-and-neuter semantics (Closed)
Patch Set: fix tests Created 4 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: 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 b51585c87ae4910829870b4ed6c6e4561d1c65b5..c5195878da23933cccdf4aef4282d0eb69b8c315 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
@@ -114,6 +114,14 @@ class CORE_EXPORT SerializedScriptValue
Transferables&,
ExceptionState&);
+ // Helper function which pulls ArrayBufferContents out of an ArrayBufferArray
+ // and neuters the ArrayBufferArray. Returns nullptr if there is an
+ // exception.
+ static std::unique_ptr<ArrayBufferContentsArray> transferArrayBufferContents(
+ v8::Isolate*,
+ const ArrayBufferArray&,
+ 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.
@@ -121,9 +129,6 @@ class CORE_EXPORT SerializedScriptValue
// The memory registration is revoked automatically in destructor.
void registerMemoryAllocatedWithCurrentScriptContext();
- // Returns true if the value contains a transferable ArrayBuffer.
- bool containsTransferableArrayBuffer() const;
-
String& data() { return m_data; }
BlobDataHandleMap& blobDataHandles() { return m_blobDataHandles; }
ArrayBufferContentsArray* getArrayBufferContentsArray() {

Powered by Google App Engine
This is Rietveld 408576698