Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index f173e8165f79fcefac562bfe58f5e96eaa6d8a4a..f8ae04de66a79d49d29cc3748beac2c02f918173 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -70,6 +70,7 @@ namespace v8 { |
class AccessorSignature; |
class Array; |
+class ArrayBuffer; |
class Boolean; |
class BooleanObject; |
class Context; |
@@ -1689,6 +1690,14 @@ class V8_EXPORT ValueSerializer { |
*/ |
std::vector<uint8_t> ReleaseBuffer(); |
+ /* |
+ * Marks an ArrayBuffer as havings its contents transferred out of band. |
+ * Pass the corresponding JSArrayBuffer in the deserializing context to |
+ * ValueDeserializer::TransferArrayBuffer. |
+ */ |
+ void TransferArrayBuffer(uint32_t transfer_id, |
+ Local<ArrayBuffer> array_buffer); |
+ |
private: |
ValueSerializer(const ValueSerializer&) = delete; |
void operator=(const ValueSerializer&) = delete; |
@@ -1722,6 +1731,13 @@ class V8_EXPORT ValueDeserializer { |
V8_WARN_UNUSED_RESULT MaybeLocal<Value> ReadValue(Local<Context> context); |
/* |
+ * Accepts the array buffer corresponding to the one passed previously to |
+ * ValueSerializer::TransferArrayBuffer. |
+ */ |
+ void TransferArrayBuffer(uint32_t transfer_id, |
+ Local<ArrayBuffer> array_buffer); |
+ |
+ /* |
* Must be called before ReadHeader to enable support for reading the legacy |
* wire format (i.e., which predates this being shipped). |
* |