Fix JSArrayBuffer for big endian.
BUG= R=jochen@chromium.org, dcarney@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com Review URL: https://codereview.chromium.org/1108373002 Cr-Commit-Position: refs/heads/master@{#28118}
This commit is contained in:
parent
29bee1604f
commit
f76fd06d11
@ -6428,7 +6428,11 @@ ACCESSORS(JSArrayBuffer, byte_length, Object, kByteLengthOffset)
|
|||||||
|
|
||||||
void JSArrayBuffer::set_bit_field(uint32_t bits) {
|
void JSArrayBuffer::set_bit_field(uint32_t bits) {
|
||||||
if (kInt32Size != kPointerSize) {
|
if (kInt32Size != kPointerSize) {
|
||||||
WRITE_UINT32_FIELD(this, kBitFieldOffset + kInt32Size, 0);
|
#if V8_TARGET_LITTLE_ENDIAN
|
||||||
|
WRITE_UINT32_FIELD(this, kBitFieldSlot + kInt32Size, 0);
|
||||||
|
#else
|
||||||
|
WRITE_UINT32_FIELD(this, kBitFieldSlot, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
WRITE_UINT32_FIELD(this, kBitFieldOffset, bits);
|
WRITE_UINT32_FIELD(this, kBitFieldOffset, bits);
|
||||||
}
|
}
|
||||||
|
@ -10268,8 +10268,13 @@ class JSArrayBuffer: public JSObject {
|
|||||||
|
|
||||||
static const int kBackingStoreOffset = JSObject::kHeaderSize;
|
static const int kBackingStoreOffset = JSObject::kHeaderSize;
|
||||||
static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
|
static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
|
||||||
static const int kBitFieldOffset = kByteLengthOffset + kPointerSize;
|
static const int kBitFieldSlot = kByteLengthOffset + kPointerSize;
|
||||||
static const int kWeakNextOffset = kBitFieldOffset + kPointerSize;
|
#if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT
|
||||||
|
static const int kBitFieldOffset = kBitFieldSlot;
|
||||||
|
#else
|
||||||
|
static const int kBitFieldOffset = kBitFieldSlot + kIntSize;
|
||||||
|
#endif
|
||||||
|
static const int kWeakNextOffset = kBitFieldSlot + kPointerSize;
|
||||||
static const int kSize = kWeakNextOffset + kPointerSize;
|
static const int kSize = kWeakNextOffset + kPointerSize;
|
||||||
|
|
||||||
static const int kSizeWithInternalFields =
|
static const int kSizeWithInternalFields =
|
||||||
|
Loading…
Reference in New Issue
Block a user