Skip to content

Commit dbecc82

Browse files
addaleaxtargos
authored andcommitted
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 c0859d7 commit dbecc82

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/node_buffer.cc

-5
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,6 @@ MaybeLocal<Object> New(Environment* env,
401401
}
402402

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

411406
if (ui.IsEmpty()) {

0 commit comments

Comments
 (0)