diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2021-01-19 12:20:23 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-01-20 03:27:41 +0300 |
commit | e3e054d020ee5ef665fc3bededa6c18f3d44e668 (patch) | |
tree | adbf526daad08c85fd3f92ab29a6066aa97c404b /src/node_blob.cc | |
parent | e9944e9a389ed8f0c4ce952cc56d068b0839863d (diff) |
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>
Diffstat (limited to 'src/node_blob.cc')
-rw-r--r-- | src/node_blob.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_blob.cc b/src/node_blob.cc index da78662366a..b147b8764a7 100644 --- a/src/node_blob.cc +++ b/src/node_blob.cc @@ -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")); |