src: Add function name for .byteLength/.compare
Reviewed-By: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
parent
6adf3ecebb
commit
f7d6147e43
@ -671,12 +671,15 @@ void SetupBufferJS(const FunctionCallbackInfo<Value>& args) {
|
|||||||
|
|
||||||
Local<Object> internal = args[1].As<Object>();
|
Local<Object> internal = args[1].As<Object>();
|
||||||
|
|
||||||
internal->Set(env->byte_length_string(),
|
Local<Function> byte_length = FunctionTemplate::New(
|
||||||
FunctionTemplate::New(
|
env->isolate(), ByteLength)->GetFunction();
|
||||||
env->isolate(), ByteLength)->GetFunction());
|
byte_length->SetName(env->byte_length_string());
|
||||||
internal->Set(env->compare_string(),
|
internal->Set(env->byte_length_string(), byte_length);
|
||||||
FunctionTemplate::New(
|
|
||||||
env->isolate(), Compare)->GetFunction());
|
Local<Function> compare = FunctionTemplate::New(
|
||||||
|
env->isolate(), Compare)->GetFunction();
|
||||||
|
compare->SetName(env->compare_string());
|
||||||
|
internal->Set(env->compare_string(), compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user