Skip to content

Commit f97aa4b

Browse files
bnoordhuisevanlucas
authored andcommitted
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: #7711 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
1 parent 78dcf0d commit f97aa4b

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/node_crypto.cc

-7
Original file line numberDiff line numberDiff line change
@@ -1822,8 +1822,6 @@ template <class Base>
18221822
void SSLWrap<Base>::SetOCSPResponse(
18231823
const v8::FunctionCallbackInfo<v8::Value>& args) {
18241824
#ifdef NODE__HAVE_TLSEXT_STATUS_CB
1825-
HandleScope scope(args.GetIsolate());
1826-
18271825
Base* w;
18281826
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
18291827
Environment* env = w->env();
@@ -1842,8 +1840,6 @@ template <class Base>
18421840
void SSLWrap<Base>::RequestOCSP(
18431841
const v8::FunctionCallbackInfo<v8::Value>& args) {
18441842
#ifdef NODE__HAVE_TLSEXT_STATUS_CB
1845-
HandleScope scope(args.GetIsolate());
1846-
18471843
Base* w;
18481844
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
18491845

@@ -1901,7 +1897,6 @@ void SSLWrap<Base>::GetEphemeralKeyInfo(
19011897
template <class Base>
19021898
void SSLWrap<Base>::SetMaxSendFragment(
19031899
const v8::FunctionCallbackInfo<v8::Value>& args) {
1904-
HandleScope scope(args.GetIsolate());
19051900
CHECK(args.Length() >= 1 && args[0]->IsNumber());
19061901

19071902
Base* w;
@@ -2204,7 +2199,6 @@ template <class Base>
22042199
void SSLWrap<Base>::GetALPNNegotiatedProto(
22052200
const FunctionCallbackInfo<v8::Value>& args) {
22062201
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
2207-
HandleScope scope(args.GetIsolate());
22082202
Base* w;
22092203
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
22102204

@@ -2226,7 +2220,6 @@ template <class Base>
22262220
void SSLWrap<Base>::SetALPNProtocols(
22272221
const FunctionCallbackInfo<v8::Value>& args) {
22282222
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
2229-
HandleScope scope(args.GetIsolate());
22302223
Base* w;
22312224
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
22322225
Environment* env = w->env();

0 commit comments

Comments
 (0)