summaryrefslogtreecommitdiff
path: root/src/cares_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/cares_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/cares_wrap.cc')
-rw-r--r--src/cares_wrap.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index 356df86907..c6ffcf0fac 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -841,7 +841,6 @@ class GetHostByNameWrap: public QueryWrap {
template <class Wrap>
static void Query(const FunctionCallbackInfo<Value>& args) {
- HandleScope handle_scope(args.GetIsolate());
Environment* env = Environment::GetCurrent(args.GetIsolate());
assert(!args.IsConstructCall());
@@ -992,7 +991,6 @@ void AfterGetNameInfo(uv_getnameinfo_t* req,
static void IsIP(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
node::Utf8Value ip(args[0]);
char address_buffer[sizeof(struct in6_addr)];
@@ -1008,7 +1006,6 @@ static void IsIP(const FunctionCallbackInfo<Value>& args) {
static void GetAddrInfo(const FunctionCallbackInfo<Value>& args) {
- HandleScope handle_scope(args.GetIsolate());
Environment* env = Environment::GetCurrent(args.GetIsolate());
assert(args[0]->IsObject());
@@ -1062,7 +1059,6 @@ static void GetAddrInfo(const FunctionCallbackInfo<Value>& args) {
static void GetNameInfo(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope handle_scope(env->isolate());
CHECK(args[0]->IsObject());
CHECK(args[1]->IsString());
@@ -1094,7 +1090,6 @@ static void GetNameInfo(const FunctionCallbackInfo<Value>& args) {
static void GetServers(const FunctionCallbackInfo<Value>& args) {
- HandleScope handle_scope(args.GetIsolate());
Environment* env = Environment::GetCurrent(args.GetIsolate());
Local<Array> server_array = Array::New(env->isolate());
@@ -1124,7 +1119,6 @@ static void GetServers(const FunctionCallbackInfo<Value>& args) {
static void SetServers(const FunctionCallbackInfo<Value>& args) {
- HandleScope handle_scope(args.GetIsolate());
Environment* env = Environment::GetCurrent(args.GetIsolate());
assert(args[0]->IsArray());
@@ -1194,7 +1188,6 @@ static void SetServers(const FunctionCallbackInfo<Value>& args) {
static void StrError(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
- HandleScope scope(env->isolate());
const char* errmsg = ares_strerror(args[0]->Int32Value());
args.GetReturnValue().Set(OneByteString(env->isolate(), errmsg));
}