Skip to content

Commit

Permalink
src: use BaseObject::kInteralFieldCount in Blob
Browse files Browse the repository at this point in the history
Instead of hard-coding the field count.

PR-URL: #36991
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
joyeecheung authored and ruyadorno committed Jan 25, 2021
1 parent f270417 commit 868d3b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 868d3b2

Please sign in to comment.