Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 8d101631df9eddeb4bcdbfd7864087e99f97dee5..0e9512e1ed2d8522fc9be281eaace0f7240c31a9 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5982,6 +5982,7 @@ v8::ArrayBuffer::Contents v8::ArrayBuffer::Externalize() { |
Contents contents; |
contents.data_ = obj->backing_store(); |
contents.byte_length_ = byte_length; |
+ contents.shared_ = obj->is_shared(); |
return contents; |
} |
@@ -6017,14 +6018,14 @@ Local<ArrayBuffer> v8::ArrayBuffer::New(Isolate* isolate, size_t byte_length) { |
Local<ArrayBuffer> v8::ArrayBuffer::New(Isolate* isolate, void* data, |
- size_t byte_length) { |
+ size_t byte_length, bool shared) { |
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
EnsureInitializedForIsolate(i_isolate, "v8::ArrayBuffer::New(void*, size_t)"); |
LOG_API(i_isolate, "v8::ArrayBuffer::New(void*, size_t)"); |
ENTER_V8(i_isolate); |
i::Handle<i::JSArrayBuffer> obj = |
i_isolate->factory()->NewJSArrayBuffer(); |
- i::Runtime::SetupArrayBuffer(i_isolate, obj, true, data, byte_length); |
+ i::Runtime::SetupArrayBuffer(i_isolate, obj, true, data, byte_length, shared); |
return Utils::ToLocal(obj); |
} |