Skip to content

Commit

Permalink
vm: remove unnecessary HandleScopes
Browse files Browse the repository at this point in the history
The accessors run inside an implicit HandleScope, there is no need to
create a new one.

PR-URL: #2001
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
bnoordhuis committed Jun 17, 2015
1 parent 91dfb5e commit 5d0cee4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ class ContextifyContext {
Local<String> property,
const PropertyCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
HandleScope scope(isolate);

ContextifyContext* ctx =
Unwrap<ContextifyContext>(args.Data().As<Object>());
Expand All @@ -387,7 +386,6 @@ class ContextifyContext {
Local<Value> value,
const PropertyCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
HandleScope scope(isolate);

ContextifyContext* ctx =
Unwrap<ContextifyContext>(args.Data().As<Object>());
Expand All @@ -400,7 +398,6 @@ class ContextifyContext {
Local<String> property,
const PropertyCallbackInfo<Integer>& args) {
Isolate* isolate = args.GetIsolate();
HandleScope scope(isolate);

ContextifyContext* ctx =
Unwrap<ContextifyContext>(args.Data().As<Object>());
Expand All @@ -422,7 +419,6 @@ class ContextifyContext {
Local<String> property,
const PropertyCallbackInfo<Boolean>& args) {
Isolate* isolate = args.GetIsolate();
HandleScope scope(isolate);

ContextifyContext* ctx =
Unwrap<ContextifyContext>(args.Data().As<Object>());
Expand All @@ -435,8 +431,6 @@ class ContextifyContext {

static void GlobalPropertyEnumeratorCallback(
const PropertyCallbackInfo<Array>& args) {
HandleScope scope(args.GetIsolate());

ContextifyContext* ctx =
Unwrap<ContextifyContext>(args.Data().As<Object>());

Expand Down

0 comments on commit 5d0cee4

Please sign in to comment.