Browse Source

vm: remove unnecessary HandleScopes

The accessors run inside an implicit HandleScope, there is no need to
create a new one.

PR-URL: https://github.com/nodejs/io.js/pull/2001
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
v2.3.1-release
Ben Noordhuis 9 years ago
parent
commit
5d0cee46bb
  1. 6
      src/node_contextify.cc

6
src/node_contextify.cc

@ -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>());
@ -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>());
@ -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>());
@ -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>());
@ -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>());

Loading…
Cancel
Save