From 3d58f3568ebcc86d70e0e5d6dbe24704b1e05e34 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Sun, 6 Jun 2010 15:45:24 +0300 Subject: [PATCH] all v8 callbacks run in their own handle scope so there is no need to declare a new one. --- ext/v8/v8_template.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/v8/v8_template.cpp b/ext/v8/v8_template.cpp index 40a3b17..0e4f7f6 100644 --- a/ext/v8/v8_template.cpp +++ b/ext/v8/v8_template.cpp @@ -52,7 +52,6 @@ namespace { * Otherwise, returns an empty handle. */ Handle RubyNamedPropertySetter(Local property, Local value, const AccessorInfo& info) { - HandleScope handles; VALUE code = (VALUE)External::Unwrap(info.Data()); VALUE setter = rb_hash_lookup(code, "setter"); VALUE result = rb_funcall(setter, rb_intern("call"), 3, rr_v82rb(property), rr_v82rb(value), rr_v82rb(info)); @@ -65,7 +64,6 @@ namespace { * The result is true if the property exists and false otherwise. */ Handle RubyNamedPropertyQuery(Local property, const AccessorInfo& info) { - HandleScope handles; VALUE code = (VALUE)External::Unwrap(info.Data()); VALUE query = rb_hash_lookup(code, "query"); VALUE result = rb_funcall(query, rb_intern("call"), 2, rr_v82rb(property), rr_v82rb(info)); @@ -79,7 +77,6 @@ namespace { * otherwise. */ Handle RubyNamedPropertyDeleter(Local property, const AccessorInfo& info) { - HandleScope handles; VALUE code = (VALUE)External::Unwrap(info.Data()); VALUE deleter = rb_hash_lookup(code, "deleter"); VALUE result = rb_funcall(deleter, rb_intern("call"), 2, rr_v82rb(property), rr_v82rb(info)); @@ -92,7 +89,6 @@ namespace { * property getter intercepts. */ Handle RubyNamedPropertyEnumerator(const AccessorInfo& info) { - HandleScope handles; VALUE code = (VALUE)External::Unwrap(info.Data()); VALUE enumerator = rb_hash_lookup(code, "enumerator"); VALUE result = rb_funcall(enumerator, rb_intern("call"), 1, rr_v82rb(info)); @@ -153,7 +149,6 @@ namespace { namespace Func { Handle RubyInvocationCallback(const Arguments& args) { - HandleScope handles; VALUE code = (VALUE)External::Unwrap(args.Data()); VALUE rb_args = rr_v82rb(args); VALUE result = rb_funcall(code, rb_intern("call"), 1, rb_args);