From 9a29aa8c552eb2b120c101c1cfd66ba565a17ed5 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Thu, 1 Aug 2013 15:02:38 -0700 Subject: [PATCH] benchmark: update misc to new v8 API --- benchmark/misc/function_call/binding.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/benchmark/misc/function_call/binding.cc b/benchmark/misc/function_call/binding.cc index 6ea928464c..b8cedd7018 100644 --- a/benchmark/misc/function_call/binding.cc +++ b/benchmark/misc/function_call/binding.cc @@ -5,13 +5,12 @@ using namespace v8; static int c = 0; -static Handle Hello(const Arguments& args) { - HandleScope scope; - return scope.Close(Integer::New(c++)); +void Hello(const FunctionCallbackInfo& args) { + args.GetReturnValue().Set(c++); } extern "C" void init (Handle target) { - HandleScope scope; + HandleScope scope(Isolate::GetCurrent()); NODE_SET_METHOD(target, "hello", Hello); }