Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 11b231f1335b3bef0e4c4ca6c293627f12d33c65..5c3b8a613a34d9a185fbbba5c3575fc7aec14526 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -8784,6 +8784,12 @@ class JSArrayBuffer: public JSObject { |
inline bool is_external(); |
inline void set_is_external(bool value); |
+ // [weak_next]: linked list of array buffers. |
+ DECL_ACCESSORS(weak_next, Object) |
+ |
+ // [weak_first_array]: weak linked list of typed arrays. |
+ DECL_ACCESSORS(weak_first_array, Object) |
+ |
// Casting. |
static inline JSArrayBuffer* cast(Object* obj); |
@@ -8794,7 +8800,12 @@ class JSArrayBuffer: public JSObject { |
static const int kBackingStoreOffset = JSObject::kHeaderSize; |
static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; |
static const int kFlagOffset = kByteLengthOffset + kPointerSize; |
- static const int kSize = kFlagOffset + kPointerSize; |
+ static const int kWeakNextOffset = kFlagOffset + kPointerSize; |
+ static const int kWeakFirstArrayOffset = kWeakNextOffset + kPointerSize; |
+ static const int kSize = kWeakFirstArrayOffset + kPointerSize; |
+ |
+ static const int kSizeWithInternalFields = |
+ kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
private: |
// Bit position in a flag |
@@ -8818,6 +8829,9 @@ class JSTypedArray: public JSObject { |
// [length]: length of typed array in elements. |
DECL_ACCESSORS(length, Object) |
+ // [weak_next]: linked list of typed arrays over the same array buffer. |
+ DECL_ACCESSORS(weak_next, Object) |
+ |
// Casting. |
static inline JSTypedArray* cast(Object* obj); |
@@ -8832,7 +8846,8 @@ class JSTypedArray: public JSObject { |
static const int kByteOffsetOffset = kBufferOffset + kPointerSize; |
static const int kByteLengthOffset = kByteOffsetOffset + kPointerSize; |
static const int kLengthOffset = kByteLengthOffset + kPointerSize; |
- static const int kSize = kLengthOffset + kPointerSize; |
+ static const int kWeakNextOffset = kLengthOffset + kPointerSize; |
+ static const int kSize = kWeakNextOffset + kPointerSize; |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray); |