@@ -464,7 +464,8 @@ static T* MallocOpenSSL(size_t count) {
464
464
465
465
void SecureContext::Initialize (Environment* env, Local<Object> target) {
466
466
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
467
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
467
+ t->InstanceTemplate ()->SetInternalFieldCount (
468
+ SecureContext::kInternalFieldCount );
468
469
Local<String> secureContextString =
469
470
FIXED_ONE_BYTE_STRING (env->isolate (), " SecureContext" );
470
471
t->SetClassName (secureContextString);
@@ -3803,7 +3804,8 @@ EVP_PKEY* ManagedEVPPKey::get() const {
3803
3804
3804
3805
Local<Function> KeyObject::Initialize (Environment* env, Local<Object> target) {
3805
3806
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
3806
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
3807
+ t->InstanceTemplate ()->SetInternalFieldCount (
3808
+ KeyObject::kInternalFieldCount );
3807
3809
3808
3810
env->SetProtoMethod (t, " init" , Init);
3809
3811
env->SetProtoMethodNoSideEffect (t, " getSymmetricKeySize" ,
@@ -4036,7 +4038,8 @@ CipherBase::CipherBase(Environment* env,
4036
4038
void CipherBase::Initialize (Environment* env, Local<Object> target) {
4037
4039
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4038
4040
4039
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4041
+ t->InstanceTemplate ()->SetInternalFieldCount (
4042
+ CipherBase::kInternalFieldCount );
4040
4043
4041
4044
env->SetProtoMethod (t, " init" , Init);
4042
4045
env->SetProtoMethod (t, " initiv" , InitIv);
@@ -4663,7 +4666,8 @@ Hmac::Hmac(Environment* env, v8::Local<v8::Object> wrap)
4663
4666
void Hmac::Initialize (Environment* env, Local<Object> target) {
4664
4667
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4665
4668
4666
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4669
+ t->InstanceTemplate ()->SetInternalFieldCount (
4670
+ Hmac::kInternalFieldCount );
4667
4671
4668
4672
env->SetProtoMethod (t, " init" , HmacInit);
4669
4673
env->SetProtoMethod (t, " update" , HmacUpdate);
@@ -4789,7 +4793,8 @@ Hash::Hash(Environment* env, v8::Local<v8::Object> wrap)
4789
4793
void Hash::Initialize (Environment* env, Local<Object> target) {
4790
4794
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
4791
4795
4792
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
4796
+ t->InstanceTemplate ()->SetInternalFieldCount (
4797
+ Hash::kInternalFieldCount );
4793
4798
4794
4799
env->SetProtoMethod (t, " update" , HashUpdate);
4795
4800
env->SetProtoMethod (t, " digest" , HashDigest);
@@ -5061,7 +5066,8 @@ Sign::Sign(Environment* env, v8::Local<v8::Object> wrap) : SignBase(env, wrap) {
5061
5066
void Sign::Initialize (Environment* env, Local<Object> target) {
5062
5067
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
5063
5068
5064
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
5069
+ t->InstanceTemplate ()->SetInternalFieldCount (
5070
+ SignBase::kInternalFieldCount );
5065
5071
5066
5072
env->SetProtoMethod (t, " init" , SignInit);
5067
5073
env->SetProtoMethod (t, " update" , SignUpdate);
@@ -5385,7 +5391,8 @@ Verify::Verify(Environment* env, v8::Local<v8::Object> wrap) :
5385
5391
void Verify::Initialize (Environment* env, Local<Object> target) {
5386
5392
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
5387
5393
5388
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
5394
+ t->InstanceTemplate ()->SetInternalFieldCount (
5395
+ SignBase::kInternalFieldCount );
5389
5396
5390
5397
env->SetProtoMethod (t, " init" , VerifyInit);
5391
5398
env->SetProtoMethod (t, " update" , VerifyUpdate);
@@ -5697,7 +5704,8 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
5697
5704
const PropertyAttribute attributes =
5698
5705
static_cast <PropertyAttribute>(ReadOnly | DontDelete);
5699
5706
5700
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
5707
+ t->InstanceTemplate ()->SetInternalFieldCount (
5708
+ DiffieHellman::kInternalFieldCount );
5701
5709
5702
5710
env->SetProtoMethod (t, " generateKeys" , GenerateKeys);
5703
5711
env->SetProtoMethod (t, " computeSecret" , ComputeSecret);
@@ -6036,7 +6044,7 @@ void ECDH::Initialize(Environment* env, Local<Object> target) {
6036
6044
6037
6045
Local<FunctionTemplate> t = env->NewFunctionTemplate (New);
6038
6046
6039
- t->InstanceTemplate ()->SetInternalFieldCount (1 );
6047
+ t->InstanceTemplate ()->SetInternalFieldCount (ECDH:: kInternalFieldCount );
6040
6048
6041
6049
env->SetProtoMethod (t, " generateKeys" , GenerateKeys);
6042
6050
env->SetProtoMethod (t, " computeSecret" , ComputeSecret);
0 commit comments