diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-11 18:24:12 +0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-10-12 02:09:16 +0400 |
commit | 97585b0d7ab0084d90faf6bded275b902d76857a (patch) | |
tree | 26853d875786c014e2e9ef5ed2ec18f7ed601775 /src/node_stat_watcher.cc | |
parent | b2e519983f1e92a874a74c11e82027955ef8909a (diff) |
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/node_stat_watcher.cc')
-rw-r--r-- | src/node_stat_watcher.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index aaaa1a3cdb0..1c3b55a0412 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -101,7 +101,6 @@ void StatWatcher::Callback(uv_fs_poll_t* handle, void StatWatcher::New(const FunctionCallbackInfo<Value>& args) { assert(args.IsConstructCall()); - HandleScope handle_scope(args.GetIsolate()); Environment* env = Environment::GetCurrent(args.GetIsolate()); new StatWatcher(env, args.This()); } @@ -109,8 +108,6 @@ void StatWatcher::New(const FunctionCallbackInfo<Value>& args) { void StatWatcher::Start(const FunctionCallbackInfo<Value>& args) { assert(args.Length() == 3); - Environment* env = Environment::GetCurrent(args.GetIsolate()); - HandleScope scope(env->isolate()); StatWatcher* wrap = Unwrap<StatWatcher>(args.Holder()); node::Utf8Value path(args[0]); @@ -127,7 +124,6 @@ void StatWatcher::Start(const FunctionCallbackInfo<Value>& args) { void StatWatcher::Stop(const FunctionCallbackInfo<Value>& args) { StatWatcher* wrap = Unwrap<StatWatcher>(args.Holder()); Environment* env = wrap->env(); - HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context()); wrap->MakeCallback(env->onstop_string(), 0, NULL); wrap->Stop(); |