Skip to content

Commit

Permalink
benchmark: update misc to new v8 API
Browse files Browse the repository at this point in the history
  • Loading branch information
trevnorris committed Aug 1, 2013
1 parent 76ada45 commit 9a29aa8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions benchmark/misc/function_call/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ using namespace v8;

static int c = 0;

static Handle<Value> Hello(const Arguments& args) {
HandleScope scope;
return scope.Close(Integer::New(c++));
void Hello(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(c++);
}

extern "C" void init (Handle<Object> target) {
HandleScope scope;
HandleScope scope(Isolate::GetCurrent());
NODE_SET_METHOD(target, "hello", Hello);
}

Expand Down

0 comments on commit 9a29aa8

Please sign in to comment.