Skip to content

Commit eef77e4

Browse files
joyeecheungruyadorno
authored andcommitted
src: use BaseObject::kInteralFieldCount in Blob
Instead of hard-coding the field count. PR-URL: #36991 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
1 parent d676324 commit eef77e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_blob.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Local<FunctionTemplate> Blob::GetConstructorTemplate(Environment* env) {
3939
Local<FunctionTemplate> tmpl = env->blob_constructor_template();
4040
if (tmpl.IsEmpty()) {
4141
tmpl = FunctionTemplate::New(env->isolate());
42-
tmpl->InstanceTemplate()->SetInternalFieldCount(1);
42+
tmpl->InstanceTemplate()->SetInternalFieldCount(
43+
BaseObject::kInternalFieldCount);
4344
tmpl->Inherit(BaseObject::GetConstructorTemplate(env));
4445
tmpl->SetClassName(
4546
FIXED_ONE_BYTE_STRING(env->isolate(), "Blob"));

0 commit comments

Comments
 (0)