From b56a3075c43ad030cecaad9b3d91b8943bf79761 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 2 Apr 2018 10:27:29 +0800 Subject: [PATCH] buffer: use v8::TypedArray::kMaxLength as buffer::kMaxLength --- src/node_buffer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_buffer.h b/src/node_buffer.h index acf9b23c3b3256..b4aa12cbcfadc6 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -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);