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

Unified Diff: src/api.cc

Issue 2275033003: Blink-compatible serialization of ArrayBuffer transfer. (Closed)
Patch Set: Accepts Created 4 years, 4 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
« no previous file with comments | « include/v8.h ('k') | src/value-serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 312faebdc716ff9d243ac663ee5770c1037edfa1..514ff08183a0a4464afd6a37974c2476da1cc44a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2865,6 +2865,12 @@ std::vector<uint8_t> ValueSerializer::ReleaseBuffer() {
return private_->serializer.ReleaseBuffer();
}
+void ValueSerializer::TransferArrayBuffer(uint32_t transfer_id,
+ Local<ArrayBuffer> array_buffer) {
+ private_->serializer.TransferArrayBuffer(transfer_id,
+ Utils::OpenHandle(*array_buffer));
+}
+
struct ValueDeserializer::PrivateData {
PrivateData(i::Isolate* i, i::Vector<const uint8_t> data)
: isolate(i), deserializer(i, data) {}
@@ -2929,6 +2935,12 @@ MaybeLocal<Value> ValueDeserializer::ReadValue(Local<Context> context) {
RETURN_ESCAPED(value);
}
+void ValueDeserializer::TransferArrayBuffer(uint32_t transfer_id,
+ Local<ArrayBuffer> array_buffer) {
+ private_->deserializer.TransferArrayBuffer(transfer_id,
+ Utils::OpenHandle(*array_buffer));
+}
+
// --- D a t a ---
bool Value::FullIsUndefined() const {
« no previous file with comments | « include/v8.h ('k') | src/value-serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698