From dbecc8252493d347b16f3ccbb859ec02a0601a83 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 13 Jan 2019 21:53:31 +0100 Subject: [PATCH] src: remove outdated `Neuter()` call in `node_buffer.cc` This call was introduced in 827ee498e332e3 to avoid a crash in a later `Neuter()` call that has later been removed in ebbbc5a790db69, rendering the original call unnecessary. Refs: https://github.com/nodejs/node/pull/3624 Refs: https://github.com/nodejs/node/pull/5204 PR-URL: https://github.com/nodejs/node/pull/25479 Reviewed-By: Anatoli Papirovski --- src/node_buffer.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 26441ed87715e3..cd361320816dc7 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -401,11 +401,6 @@ MaybeLocal New(Environment* env, } Local ab = ArrayBuffer::New(env->isolate(), data, length); - // `Neuter()`ing is required here to prevent materialization of the backing - // store in v8. `nullptr` buffers are not writable, so this is semantically - // correct. - if (data == nullptr) - ab->Neuter(); MaybeLocal ui = Buffer::New(env, ab, 0, length); if (ui.IsEmpty()) {