★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/dbecc82524Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
src: remove outdated Neuter() call in node_buffer.cc
This call was introduced in 827ee49 to avoid a crash in a
later `Neuter()` call that has later been removed in ebbbc5a,
rendering the original call unnecessary.

Refs: #3624
Refs: #5204

PR-URL: #25479
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
  • Loading branch information
addaleax authored and targos committed Jan 24, 2019
1 parent c0859d7 commit dbecc8252493d347b16f3ccbb859ec02a0601a83
Showing 1 changed file with 0 additions and 5 deletions.
@@ -401,11 +401,6 @@ MaybeLocal<Object> New(Environment* env,
}

Local<ArrayBuffer> 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<Uint8Array> ui = Buffer::New(env, ab, 0, length);

if (ui.IsEmpty()) {

0 comments on commit dbecc82

Please sign in to comment.