From bad990c934871c4a5e91dec7dc902741e580e415 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 Backport-PR-URL: https://github.com/nodejs/node/pull/39704 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 99003cce50ed27..d227ec58223b17 100644 --- a/src/node_blob.cc +++ b/src/node_blob.cc @@ -38,7 +38,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"));