From 48c52d765d474eb3d10699b6eda4a9ec23202db5 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 13 Jul 2016 16:38:27 +0200 Subject: [PATCH] src: remove unnecessary HandleScopes API function callbacks run inside an implicit HandleScope. We don't need to explicitly create one and in fact introduce some unnecessary overhead when we do. PR-URL: https://github.com/nodejs/node/pull/7711 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Trevor Norris --- src/node_crypto.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index a7964cde94a..2b85d1a6098 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1822,8 +1822,6 @@ template void SSLWrap::SetOCSPResponse( const v8::FunctionCallbackInfo& args) { #ifdef NODE__HAVE_TLSEXT_STATUS_CB - HandleScope scope(args.GetIsolate()); - Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); Environment* env = w->env(); @@ -1842,8 +1840,6 @@ template void SSLWrap::RequestOCSP( const v8::FunctionCallbackInfo& args) { #ifdef NODE__HAVE_TLSEXT_STATUS_CB - HandleScope scope(args.GetIsolate()); - Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); @@ -1901,7 +1897,6 @@ void SSLWrap::GetEphemeralKeyInfo( template void SSLWrap::SetMaxSendFragment( const v8::FunctionCallbackInfo& args) { - HandleScope scope(args.GetIsolate()); CHECK(args.Length() >= 1 && args[0]->IsNumber()); Base* w; @@ -2204,7 +2199,6 @@ template void SSLWrap::GetALPNNegotiatedProto( const FunctionCallbackInfo& args) { #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation - HandleScope scope(args.GetIsolate()); Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); @@ -2226,7 +2220,6 @@ template void SSLWrap::SetALPNProtocols( const FunctionCallbackInfo& args) { #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation - HandleScope scope(args.GetIsolate()); Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); Environment* env = w->env();