mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
benchmark: update misc to new v8 API
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user