benchmark: update misc to new v8 API
This commit is contained in:
parent
76ada45342
commit
9a29aa8c55
@ -5,13 +5,12 @@ using namespace v8;
|
|||||||
|
|
||||||
static int c = 0;
|
static int c = 0;
|
||||||
|
|
||||||
static Handle<Value> Hello(const Arguments& args) {
|
void Hello(const FunctionCallbackInfo<Value>& args) {
|
||||||
HandleScope scope;
|
args.GetReturnValue().Set(c++);
|
||||||
return scope.Close(Integer::New(c++));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void init (Handle<Object> target) {
|
extern "C" void init (Handle<Object> target) {
|
||||||
HandleScope scope;
|
HandleScope scope(Isolate::GetCurrent());
|
||||||
NODE_SET_METHOD(target, "hello", Hello);
|
NODE_SET_METHOD(target, "hello", Hello);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user