From 6f3ac5d6b400e8bf17963da76640b9ec143dd449 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 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 7ce79fda7008d3..e047b30443df4f 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1776,8 +1776,6 @@ template void SSLWrap::SetOCSPResponse( const v8::FunctionCallbackInfo& args) { #ifdef NODE__HAVE_TLSEXT_STATUS_CB - HandleScope scope(args.GetIsolate()); - Base* w = Unwrap(args.Holder()); if (args.Length() < 1 || !Buffer::HasInstance(args[0])) return w->env()->ThrowTypeError("Must give a Buffer as first argument"); @@ -1791,8 +1789,6 @@ template void SSLWrap::RequestOCSP( const v8::FunctionCallbackInfo& args) { #ifdef NODE__HAVE_TLSEXT_STATUS_CB - HandleScope scope(args.GetIsolate()); - Base* w = Unwrap(args.Holder()); SSL_set_tlsext_status_type(w->ssl_, TLSEXT_STATUSTYPE_ocsp); @@ -1804,7 +1800,6 @@ void SSLWrap::RequestOCSP( template void SSLWrap::SetMaxSendFragment( const v8::FunctionCallbackInfo& args) { - HandleScope scope(args.GetIsolate()); CHECK(args.Length() >= 1 && args[0]->IsNumber()); Base* w = Unwrap(args.Holder());