Skip to content

Commit

Permalink
benchmark: fix build warnings
Browse files Browse the repository at this point in the history
The napi/* benchmarks were using an incorrect signature for the V8
add-on init function. This was causing a warning.

Signed-off-by: Gabriel Schulhof <[email protected]>
PR-URL: #36157
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
Gabriel Schulhof authored and codebytere committed Nov 22, 2020
1 parent 2d24912 commit 3ee556a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion benchmark/napi/function_args/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ void CallWithArguments(const FunctionCallbackInfo<Value>& args) {
}
}

void Initialize(Local<Object> target) {
void Initialize(Local<Object> target,
Local<Value> module,
void* data) {
NODE_SET_METHOD(target, "callWithString", CallWithString);
NODE_SET_METHOD(target, "callWithLongString", CallWithString);

Expand Down
4 changes: 3 additions & 1 deletion benchmark/napi/function_call/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ void Hello(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(c++);
}

void Initialize(v8::Local<v8::Object> target) {
void Initialize(v8::Local<v8::Object> target,
v8::Local<v8::Value> module,
void* data) {
NODE_SET_METHOD(target, "hello", Hello);
}

Expand Down

0 comments on commit 3ee556a

Please sign in to comment.