Commit b7bbe0af authored by Kim-Anh Tran's avatar Kim-Anh Tran Committed by Commit Bot

[v8] Change TypedArray max length definition for 32 bit builds

This makes the 4GB max length compilable for 32 bit MSVC.

Bug: chromium:1095721
Change-Id: I2be9f69668687f18beb86028debb3fd5ff350202
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2272558Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68637}
parent 367b0c1e
......@@ -5365,9 +5365,10 @@ class V8_EXPORT TypedArray : public ArrayBufferView {
/*
* The largest typed array size that can be constructed using New.
*/
static constexpr size_t kMaxLength = internal::kApiSystemPointerSize == 4
static constexpr size_t kMaxLength =
internal::kApiSystemPointerSize == 4
? internal::kSmiMaxValue
: size_t{1} << 32;
: static_cast<size_t>(uint64_t{1} << 32);
/**
* Number of elements in this typed array
......
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