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

Unified Diff: src/api.cc

Issue 149053009: V8 JavaScript shared memory prototype. Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: Tweaks Created 6 years, 7 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/arraybuffer.js » ('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 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);
}
« no previous file with comments | « include/v8.h ('k') | src/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698