summaryrefslogtreecommitdiff
path: root/src/tls_wrap.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-10-11 16:24:12 +0200
committerFedor Indutny <fedor@indutny.com>2014-10-12 02:09:16 +0400
commit97585b0d7ab0084d90faf6bded275b902d76857a (patch)
tree26853d875786c014e2e9ef5ed2ec18f7ed601775 /src/tls_wrap.cc
parentb2e519983f1e92a874a74c11e82027955ef8909a (diff)
downloadnode-new-97585b0d7ab0084d90faf6bded275b902d76857a.tar.gz
src: remove unnecessary HandleScopes
API callback functions don't need to create a v8::HandleScope instance because V8 already creates one in the JS->C++ adapter frame. PR-URL: https://github.com/node-forward/node/pull/16 Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'src/tls_wrap.cc')
-rw-r--r--src/tls_wrap.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc
index ac05c8ecac..9006fcf8bd 100644
--- a/src/tls_wrap.cc
+++ b/src/tls_wrap.cc
@@ -206,7 +206,6 @@ void TLSCallbacks::InitSSL() {
void TLSCallbacks::Wrap(const FunctionCallbackInfo<Value>& args) {
- HandleScope handle_scope(args.GetIsolate());
Environment* env = Environment::GetCurrent(args.GetIsolate());
if (args.Length() < 1 || !args[0]->IsObject()) {
@@ -240,8 +239,6 @@ void TLSCallbacks::Wrap(const FunctionCallbackInfo<Value>& args) {
void TLSCallbacks::Receive(const FunctionCallbackInfo<Value>& args) {
- HandleScope handle_scope(args.GetIsolate());
-
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());
CHECK(Buffer::HasInstance(args[0]));
@@ -267,7 +264,6 @@ void TLSCallbacks::Receive(const FunctionCallbackInfo<Value>& args) {
void TLSCallbacks::Start(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());
@@ -685,7 +681,6 @@ int TLSCallbacks::DoShutdown(ShutdownWrap* req_wrap, uv_shutdown_cb cb) {
void TLSCallbacks::SetVerifyMode(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());
@@ -716,22 +711,14 @@ void TLSCallbacks::SetVerifyMode(const FunctionCallbackInfo<Value>& args) {
void TLSCallbacks::EnableSessionCallbacks(
const FunctionCallbackInfo<Value>& args) {
- Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
-
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());
-
wrap->enable_session_callbacks();
EnableHelloParser(args);
}
void TLSCallbacks::EnableHelloParser(const FunctionCallbackInfo<Value>& args) {
- Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
-
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());
-
NodeBIO::FromBIO(wrap->enc_in_)->set_initial(kMaxHelloLength);
wrap->hello_parser_.Start(SSLWrap<TLSCallbacks>::OnClientHello,
OnClientHelloParseEnd,
@@ -748,7 +735,6 @@ void TLSCallbacks::OnClientHelloParseEnd(void* arg) {
#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
void TLSCallbacks::GetServername(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());
@@ -764,7 +750,6 @@ void TLSCallbacks::GetServername(const FunctionCallbackInfo<Value>& args) {
void TLSCallbacks::SetServername(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
TLSCallbacks* wrap = Unwrap<TLSCallbacks>(args.Holder());