@@ -26,7 +26,6 @@ using v8::Function;
26
26
using v8::FunctionCallbackInfo;
27
27
using v8::FunctionTemplate;
28
28
using v8::Handle ;
29
- using v8::HandleScope;
30
29
using v8::Integer;
31
30
using v8::Local;
32
31
using v8::Null;
@@ -251,8 +250,6 @@ void TLSWrap::SSLInfoCallback(const SSL* ssl_, int where, int ret) {
251
250
SSL* ssl = const_cast <SSL*>(ssl_);
252
251
TLSWrap* c = static_cast <TLSWrap*>(SSL_get_app_data (ssl));
253
252
Environment* env = c->env ();
254
- HandleScope handle_scope (env->isolate ());
255
- Context::Scope context_scope (env->context ());
256
253
Local<Object> object = c->object ();
257
254
258
255
if (where & SSL_CB_HANDSHAKE_START) {
@@ -395,9 +392,6 @@ void TLSWrap::ClearOut() {
395
392
if (eof_)
396
393
return ;
397
394
398
- HandleScope handle_scope (env ()->isolate ());
399
- Context::Scope context_scope (env ()->context ());
400
-
401
395
CHECK_NE (ssl_, nullptr );
402
396
403
397
char out[kClearOutChunkSize ];
@@ -470,9 +464,6 @@ bool TLSWrap::ClearIn() {
470
464
return true ;
471
465
}
472
466
473
- HandleScope handle_scope (env ()->isolate ());
474
- Context::Scope context_scope (env ()->context ());
475
-
476
467
// Error or partial write
477
468
int err;
478
469
Local<Value> arg = GetSSLError (written, &err, &error_);
@@ -588,8 +579,6 @@ int TLSWrap::DoWrite(WriteWrap* w,
588
579
589
580
if (i != count) {
590
581
int err;
591
- HandleScope handle_scope (env ()->isolate ());
592
- Context::Scope context_scope (env ()->context ());
593
582
Local<Value> arg = GetSSLError (written, &err, &error_);
594
583
if (!arg.IsEmpty ())
595
584
return UV_EPROTO;
@@ -662,8 +651,6 @@ void TLSWrap::DoRead(ssize_t nread,
662
651
eof_ = true ;
663
652
}
664
653
665
- HandleScope handle_scope (env ()->isolate ());
666
- Context::Scope context_scope (env ()->context ());
667
654
OnRead (nread, nullptr );
668
655
return ;
669
656
}
@@ -796,7 +783,6 @@ int TLSWrap::SelectSNIContextCallback(SSL* s, int* ad, void* arg) {
796
783
if (servername == nullptr )
797
784
return SSL_TLSEXT_ERR_OK;
798
785
799
- HandleScope scope (env->isolate ());
800
786
// Call the SNI callback and use its return value as context
801
787
Local<Object> object = p->object ();
802
788
Local<Value> ctx = object->Get (env->sni_context_string ());
0 commit comments