Skip to content

Commit 30f4568

Browse files
committed
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>
1 parent 6708011 commit 30f4568

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/node_buffer.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,6 @@ MaybeLocal<Object> New(Environment* env,
403403
}
404404

405405
Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(), data, length);
406-
// `Neuter()`ing is required here to prevent materialization of the backing
407-
// store in v8. `nullptr` buffers are not writable, so this is semantically
408-
// correct.
409-
if (data == nullptr)
410-
ab->Neuter();
411406
MaybeLocal<Uint8Array> ui = Buffer::New(env, ab, 0, length);
412407

413408
CallbackInfo::New(env->isolate(), ab, callback, data, hint);

0 commit comments

Comments
 (0)