Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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: nodejs/node#3624
Refs: nodejs/node#5204

PR-URL: nodejs/node#25479
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
addaleax authored and deepak1556 committed Jul 10, 2019
commit e13e8fe0bff67de3c600096ae0c1818b22a082a8
5 changes: 0 additions & 5 deletions src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,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()) {
Expand Down