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:
parent
67080113e7
commit
30f45683aa
@ -403,11 +403,6 @@ MaybeLocal<Object> New(Environment* env,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(), data, length);
|
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);
|
MaybeLocal<Uint8Array> ui = Buffer::New(env, ab, 0, length);
|
||||||
|
|
||||||
CallbackInfo::New(env->isolate(), ab, callback, data, hint);
|
CallbackInfo::New(env->isolate(), ab, callback, data, hint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user