Skip to content

Commit 47ef487

Browse files
joyeecheungfoxxyz
authored andcommitted
src: use BaseObject::kInteralFieldCount in Blob
Instead of hard-coding the field count. PR-URL: nodejs#36991 Backport-PR-URL: nodejs#39704 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 500256d commit 47ef487

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
@@ -38,7 +38,8 @@ Local<FunctionTemplate> Blob::GetConstructorTemplate(Environment* env) {
3838
Local<FunctionTemplate> tmpl = env->blob_constructor_template();
3939
if (tmpl.IsEmpty()) {
4040
tmpl = FunctionTemplate::New(env->isolate());
41-
tmpl->InstanceTemplate()->SetInternalFieldCount(1);
41+
tmpl->InstanceTemplate()->SetInternalFieldCount(
42+
BaseObject::kInternalFieldCount);
4243
tmpl->Inherit(BaseObject::GetConstructorTemplate(env));
4344
tmpl->SetClassName(
4445
FIXED_ONE_BYTE_STRING(env->isolate(), "Blob"));

0 commit comments

Comments
 (0)