Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f97aa4b

Browse filesBrowse 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 <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1 parent 78dcf0d commit f97aa4b
Copy full SHA for f97aa4b

File tree

Expand file treeCollapse file tree

1 file changed

+0
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-7
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
-7Lines changed: 0 additions & 7 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.