Skip to content
Prev Previous commit
Next Next commit
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>
  • Loading branch information
joyeecheung authored and targos committed Aug 13, 2021
commit 2dd94671e4ead9cf0734ca25e7b7dc3df4217e72
3 changes: 2 additions & 1 deletion src/node_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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"));
Expand Down