mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
src: use BaseObject::kInternalFieldCount in X509Certificate constructor
Use defined constant instead of hard-coding the field count PR-URL: https://github.com/nodejs/node/pull/36892 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
f07e1c9d03
commit
d54998538e
1 file changed
+2
-1
@@ -56,7 +56,8 @@ Local<FunctionTemplate> X509Certificate::GetConstructorTemplate(
|
||||
Local<FunctionTemplate> tmpl = env->x509_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(), "X509Certificate"));
|
||||
|
||||
Reference in new issue
Block a user