Commit 7d02925e authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[api] Reorder fields in {SharedArrayBuffer,ArrayBuffer}::Contents.

This is for backwards ABI compatibility to version 6.0.

R=bmeurer@chromium.org

Bug: v8:6592
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I20f3fa79324511c6e393ddaad50880f22ef6df77
Reviewed-on: https://chromium-review.googlesource.com/569758Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46625}
parent 485786b4
......@@ -4284,11 +4284,11 @@ class V8_EXPORT ArrayBuffer : public Object {
class V8_EXPORT Contents { // NOLINT
public:
Contents()
: allocation_base_(nullptr),
: data_(nullptr),
byte_length_(0),
allocation_base_(nullptr),
allocation_length_(0),
allocation_mode_(Allocator::AllocationMode::kNormal),
data_(nullptr),
byte_length_(0) {}
allocation_mode_(Allocator::AllocationMode::kNormal) {}
void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
......@@ -4300,11 +4300,11 @@ class V8_EXPORT ArrayBuffer : public Object {
size_t ByteLength() const { return byte_length_; }
private:
void* data_;
size_t byte_length_;
void* allocation_base_;
size_t allocation_length_;
Allocator::AllocationMode allocation_mode_;
void* data_;
size_t byte_length_;
friend class ArrayBuffer;
};
......@@ -4654,11 +4654,11 @@ class V8_EXPORT SharedArrayBuffer : public Object {
class V8_EXPORT Contents { // NOLINT
public:
Contents()
: allocation_base_(nullptr),
: data_(nullptr),
byte_length_(0),
allocation_base_(nullptr),
allocation_length_(0),
allocation_mode_(ArrayBuffer::Allocator::AllocationMode::kNormal),
data_(nullptr),
byte_length_(0) {}
allocation_mode_(ArrayBuffer::Allocator::AllocationMode::kNormal) {}
void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
......@@ -4670,11 +4670,11 @@ class V8_EXPORT SharedArrayBuffer : public Object {
size_t ByteLength() const { return byte_length_; }
private:
void* data_;
size_t byte_length_;
void* allocation_base_;
size_t allocation_length_;
ArrayBuffer::Allocator::AllocationMode allocation_mode_;
void* data_;
size_t byte_length_;
friend class SharedArrayBuffer;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment