mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: use BaseObject::kInteralFieldCount in Blob
Instead of hard-coding the field count. PR-URL: https://github.com/nodejs/node/pull/36991 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
committed by
Antoine du Hamel
parent
e9944e9a38
commit
e3e054d020
@@ -39,7 +39,8 @@ Local<FunctionTemplate> Blob::GetConstructorTemplate(Environment* env) {
|
||||
Local<FunctionTemplate> tmpl = env->blob_constructor_template();
|
||||
if (tmpl.IsEmpty()) {
|
||||
tmpl = FunctionTemplate::New(env->isolate());
|
||||
tmpl->InstanceTemplate()->SetInternalFieldCount(1);
|
||||
tmpl->InstanceTemplate()->SetInternalFieldCount(
|
||||
BaseObject::kInternalFieldCount);
|
||||
tmpl->Inherit(BaseObject::GetConstructorTemplate(env));
|
||||
tmpl->SetClassName(
|
||||
FIXED_ONE_BYTE_STRING(env->isolate(), "Blob"));
|
||||
|
||||
Reference in New Issue
Block a user