From e3e054d020ee5ef665fc3bededa6c18f3d44e668 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 19 Jan 2021 17:20:23 +0800 Subject: [PATCH] src: use BaseObject::kInteralFieldCount in Blob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of hard-coding the field count. PR-URL: https://github.com/nodejs/node/pull/36991 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Juan José Arboleda --- src/node_blob.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_blob.cc b/src/node_blob.cc index da78662366a842..b147b8764a7668 100644 --- a/src/node_blob.cc +++ b/src/node_blob.cc @@ -39,7 +39,8 @@ Local Blob::GetConstructorTemplate(Environment* env) { Local 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"));