diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-11 16:24:12 +0200 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-10-12 02:09:16 +0400 |
commit | 97585b0d7ab0084d90faf6bded275b902d76857a (patch) | |
tree | 26853d875786c014e2e9ef5ed2ec18f7ed601775 /src/signal_wrap.cc | |
parent | b2e519983f1e92a874a74c11e82027955ef8909a (diff) | |
download | node-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/signal_wrap.cc')
-rw-r--r-- | src/signal_wrap.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index a50340d511..0c814358f3 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -68,7 +68,6 @@ class SignalWrap : public HandleWrap { // Therefore we assert that we are not trying to call this as a // normal function. assert(args.IsConstructCall()); - HandleScope handle_scope(args.GetIsolate()); Environment* env = Environment::GetCurrent(args.GetIsolate()); new SignalWrap(env, args.This()); } @@ -86,20 +85,14 @@ class SignalWrap : public HandleWrap { } static void Start(const FunctionCallbackInfo<Value>& args) { - Environment* env = Environment::GetCurrent(args.GetIsolate()); - HandleScope scope(env->isolate()); SignalWrap* wrap = Unwrap<SignalWrap>(args.Holder()); - int signum = args[0]->Int32Value(); int err = uv_signal_start(&wrap->handle_, OnSignal, signum); args.GetReturnValue().Set(err); } static void Stop(const FunctionCallbackInfo<Value>& args) { - Environment* env = Environment::GetCurrent(args.GetIsolate()); - HandleScope scope(env->isolate()); SignalWrap* wrap = Unwrap<SignalWrap>(args.Holder()); - int err = uv_signal_stop(&wrap->handle_); args.GetReturnValue().Set(err); } |