From efe1781f3d311d437ec2ae26f475e7bd0cdca4f0 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Fri, 16 Jan 2015 07:41:55 -0800 Subject: [PATCH] crypto: don't use transitionary ThrowException Since the current environment is in scope use ThrowError on that, instead of having to lookup the Environment again. Added benefit, lint the source code. Reviewed-By: Colin Ihrig Reviewed-By: Julien Gilli --- src/node_crypto.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index e1dd06c408..03650a98c6 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -344,19 +344,19 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { #ifndef OPENSSL_NO_SSL3 method = SSLv3_method(); #else - return ThrowException(Exception::Error(String::New("SSLv3 methods disabled"))); + return env->ThrowError("SSLv3 methods disabled"); #endif } else if (strcmp(*sslmethod, "SSLv3_server_method") == 0) { #ifndef OPENSSL_NO_SSL3 method = SSLv3_server_method(); #else - return ThrowException(Exception::Error(String::New("SSLv3 methods disabled"))); + return env->ThrowError("SSLv3 methods disabled"); #endif } else if (strcmp(*sslmethod, "SSLv3_client_method") == 0) { #ifndef OPENSSL_NO_SSL3 method = SSLv3_client_method(); #else - return ThrowException(Exception::Error(String::New("SSLv3 methods disabled"))); + return env->ThrowError("SSLv3 methods disabled"); #endif } else if (strcmp(*sslmethod, "SSLv23_method") == 0) { method = SSLv23_method();