@@ -432,7 +432,8 @@ bool EntropySource(unsigned char* buffer, size_t length) {
432
432
433
433
void SecureContext::Initialize (Environment* env, Local<Object> target) {
434
434
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
435
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
435
+ t->InstanceTemplate ()->SetInternalFieldCount (
436
+ SecureContext::kInternalFieldCount );
436
437
Local<String> secureContextString =
437
438
FIXED_ONE_BYTE_STRING (env->isolate (), " SecureContext" );
438
439
t->SetClassName (secureContextString);
@@ -3217,7 +3218,8 @@ EVP_PKEY* ManagedEVPPKey::get() const {
3217
3218
3218
3219
Local<Function> KeyObject::Initialize (Environment* env, Local<Object> target) {
3219
3220
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
3220
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
3221
+ t->InstanceTemplate ()->SetInternalFieldCount (
3222
+ KeyObject::kInternalFieldCount );
3221
3223
3222
3224
env->SetProtoMethod (t, " init" , Init);
3223
3225
env->SetProtoMethodNoSideEffect (t, " getSymmetricKeySize" ,
@@ -3450,7 +3452,8 @@ CipherBase::CipherBase(Environment* env,
3450
3452
void CipherBase::Initialize (Environment* env, Local<Object> target) {
3451
3453
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
3452
3454
3453
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
3455
+ t->InstanceTemplate ()->SetInternalFieldCount (
3456
+ CipherBase::kInternalFieldCount );
3454
3457
3455
3458
env->SetProtoMethod (t, " init" , Init);
3456
3459
env->SetProtoMethod (t, " initiv" , InitIv);
@@ -4076,7 +4079,8 @@ Hmac::Hmac(Environment* env, Local<Object> wrap)
4076
4079
void Hmac::Initialize (Environment* env, Local<Object> target) {
4077
4080
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4078
4081
4079
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4082
+ t->InstanceTemplate ()->SetInternalFieldCount (
4083
+ Hmac::kInternalFieldCount );
4080
4084
4081
4085
env->SetProtoMethod (t, " init" , HmacInit);
4082
4086
env->SetProtoMethod (t, " update" , HmacUpdate);
@@ -4201,7 +4205,8 @@ Hash::Hash(Environment* env, Local<Object> wrap)
4201
4205
void Hash::Initialize (Environment* env, Local<Object> target) {
4202
4206
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4203
4207
4204
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4208
+ t->InstanceTemplate ()->SetInternalFieldCount (
4209
+ Hash::kInternalFieldCount );
4205
4210
4206
4211
env->SetProtoMethod (t, " update" , HashUpdate);
4207
4212
env->SetProtoMethod (t, " digest" , HashDigest);
@@ -4472,7 +4477,8 @@ Sign::Sign(Environment* env, Local<Object> wrap) : SignBase(env, wrap) {
4472
4477
void Sign::Initialize (Environment* env, Local<Object> target) {
4473
4478
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4474
4479
4475
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4480
+ t->InstanceTemplate ()->SetInternalFieldCount (
4481
+ SignBase::kInternalFieldCount );
4476
4482
4477
4483
env->SetProtoMethod (t, " init" , SignInit);
4478
4484
env->SetProtoMethod (t, " update" , SignUpdate);
@@ -4796,7 +4802,8 @@ Verify::Verify(Environment* env, Local<Object> wrap)
4796
4802
void Verify::Initialize (Environment* env, Local<Object> target) {
4797
4803
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4798
4804
4799
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4805
+ t->InstanceTemplate ()->SetInternalFieldCount (
4806
+ SignBase::kInternalFieldCount );
4800
4807
4801
4808
env->SetProtoMethod (t, " init" , VerifyInit);
4802
4809
env->SetProtoMethod (t, " update" , VerifyUpdate);
@@ -5107,7 +5114,8 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
5107
5114
const PropertyAttribute attributes =
5108
5115
static_cast <PropertyAttribute>(ReadOnly | DontDelete);
5109
5116
5110
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
5117
+ t->InstanceTemplate ()->SetInternalFieldCount (
5118
+ DiffieHellman::kInternalFieldCount );
5111
5119
5112
5120
env->SetProtoMethod (t, " generateKeys" , GenerateKeys);
5113
5121
env->SetProtoMethod (t, " computeSecret" , ComputeSecret);
@@ -5446,7 +5454,7 @@ void ECDH::Initialize(Environment* env, Local<Object> target) {
5446
5454
5447
5455
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
5448
5456
5449
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
5457
+ t->InstanceTemplate ()->SetInternalFieldCount (ECDH:: kInternalFieldCount );
5450
5458
5451
5459
env->SetProtoMethod (t, " generateKeys" , GenerateKeys);
5452
5460
env->SetProtoMethod (t, " computeSecret" , ComputeSecret);
0 commit comments