File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ namespace node {
2929
3030namespace Buffer {
3131
32- static const size_t kMaxLength = v8::Uint8Array:: kMaxLength ;
32+ static const size_t kMaxLength = v8::TypedArray:: kMaxByteLength ;
3333
3434typedef void (*FreeCallback)(char * data, void * hint);
3535
Original file line number Diff line number Diff line change @@ -272,10 +272,9 @@ inline void THROW_ERR_REQUIRE_ASYNC_MODULE(
272272
273273inline v8::Local<v8::Object> ERR_BUFFER_TOO_LARGE (v8::Isolate* isolate) {
274274 char message[128 ];
275- snprintf (message,
276- sizeof (message),
277- " Cannot create a Buffer larger than 0x%zx bytes" ,
278- Buffer::kMaxLength );
275+ snprintf (message, sizeof (message),
276+ " Cannot create a Buffer larger than 0x%zx bytes" ,
277+ v8::TypedArray::kMaxByteLength );
279278 return ERR_BUFFER_TOO_LARGE (isolate, message);
280279}
281280
You can’t perform that action at this time.
0 commit comments