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

Unified Diff: include/v8.h

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 | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 04e77030c5033e75bc90f219af383b4a7eae6d67..a4d2b133b3522b7b2ba31b9f96924e211eab4ef7 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2769,14 +2769,16 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
class V8_EXPORT Contents { // NOLINT
public:
- Contents() : data_(NULL), byte_length_(0) {}
+ Contents() : data_(NULL), byte_length_(0), shared_(false) {}
void* Data() const { return data_; }
size_t ByteLength() const { return byte_length_; }
+ bool Shared() const { return shared_; }
private:
void* data_;
size_t byte_length_;
+ bool shared_;
friend class ArrayBuffer;
};
@@ -2802,7 +2804,7 @@ class V8_EXPORT ArrayBuffer : public Object {
* is garbage-collected.
*/
static Local<ArrayBuffer> New(Isolate* isolate, void* data,
- size_t byte_length);
+ size_t byte_length, bool shared = false);
/**
* Returns true if ArrayBuffer is extrenalized, that is, does not
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698