Commit 9995159a authored by jyan's avatar jyan Committed by Commit bot

[builtins] Fix LoadObjectField for JSTypedArray::kBufferOffset

JSTypedArray::kBufferOffset contains a 32-bit integer in memory.
And it's stored as whole at set_bit_field. When we try to load its
first byte in memory, we get the less significant byte on LE but
the most significant byte on BE, which is not consistent.

R=bmeurer@chromium.org, gsathya@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2102203002
Cr-Commit-Position: refs/heads/master@{#37396}
parent 36c63513
......@@ -3239,7 +3239,7 @@ void Generate_TypedArrayProtoypeGetter(CodeStubAssembler* assembler,
Node* receiver_buffer =
assembler->LoadObjectField(receiver, JSTypedArray::kBufferOffset);
Node* receiver_buffer_bit_field = assembler->LoadObjectField(
receiver_buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Int8());
receiver_buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32());
Label if_receiverisneutered(assembler, Label::kDeferred);
assembler->GotoUnless(
assembler->Word32Equal(
......
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