src: remove outdated Neuter() call in node_buffer.cc

This call was introduced in 827ee498e332e3 to avoid a crash in a
later `Neuter()` call that has later been removed in ebbbc5a790db69,
rendering the original call unnecessary.

Refs: https://github.com/nodejs/node/pull/3624
Refs: https://github.com/nodejs/node/pull/5204

PR-URL: https://github.com/nodejs/node/pull/25479
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit is contained in:
Anna Henningsen 2019-01-13 21:53:31 +01:00
parent 67080113e7
commit 30f45683aa
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -403,11 +403,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);
CallbackInfo::New(env->isolate(), ab, callback, data, hint);