From adc0597451c3369dc24a3c66049214c5f7c1db00 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 17 Aug 2010 06:31:18 -0500 Subject: [PATCH] expose SetCallAsFunctionHandler() to ObjectTemplate --- ext/v8/v8_script.cpp | 2 ++ ext/v8/v8_template.cpp | 24 +++++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ext/v8/v8_script.cpp b/ext/v8/v8_script.cpp index 63dca31..c610742 100644 --- a/ext/v8/v8_script.cpp +++ b/ext/v8/v8_script.cpp @@ -14,12 +14,14 @@ namespace { } VALUE Compile(VALUE self, VALUE source, VALUE source_name) { + HandleScope scope; Local src(rr_rb2v8(source)->ToString()); Local src_name(rr_rb2v8(source_name)->ToString()); return rr_v8_ref_create(self, Script::Compile(src, src_name)); } VALUE Run(VALUE self) { + HandleScope scope; Local