buffer: use v8::TypedArray::kMaxLength as buffer::kMaxLength
This was added in v8 6.2, looks like a safe replacement for our own buffer::kMaxLength. PR-URL: https://github.com/nodejs/node/pull/19738 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
2fef227a61
commit
30fe55e248
@ -31,8 +31,7 @@ extern bool zero_fill_all_buffers;
|
||||
|
||||
namespace Buffer {
|
||||
|
||||
static const unsigned int kMaxLength =
|
||||
sizeof(int32_t) == sizeof(intptr_t) ? 0x3fffffff : 0x7fffffff;
|
||||
static const unsigned int kMaxLength = v8::TypedArray::kMaxLength;
|
||||
|
||||
typedef void (*FreeCallback)(char* data, void* hint);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user