Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-04-02 05:27:29 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2018-04-04 09:09:51 +0300
commit30fe55e248087664e91928794ef281fbf2ba8c8d (patch)
tree1fa1d9158fc5756bc2e2551884941e7aa23de42d /src/node_buffer.h
parent2fef227a614a16f894b574ba9bfe84fc56b64681 (diff)
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>
Diffstat (limited to 'src/node_buffer.h')
-rw-r--r--src/node_buffer.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node_buffer.h b/src/node_buffer.h
index acf9b23c3b3..b4aa12cbcfa 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);