Skip to content

Commit cd4a932

Browse files
addaleaxMylesBorins
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 46a816f commit cd4a932

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Diff for: src/node_buffer.cc

-5
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,6 @@ MaybeLocal<Object> New(Environment* env,
392392
}
393393

394394
Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(), data, length);
395-
// `Neuter()`ing is required here to prevent materialization of the backing
396-
// store in v8. `nullptr` buffers are not writable, so this is semantically
397-
// correct.
398-
if (data == nullptr)
399-
ab->Neuter();
400395
MaybeLocal<Uint8Array> ui = Buffer::New(env, ab, 0, length);
401396

402397
if (ui.IsEmpty()) {

0 commit comments

Comments
 (0)