Skip to content

Commit db06543

Browse files
Gabriel SchulhofBethGriggs
Gabriel Schulhof
authored andcommitted
benchmark: fix build warnings
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 <gabriel.schulhof@intel.com> PR-URL: #36157 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 6538075 commit db06543

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

benchmark/napi/function_args/binding.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ void CallWithArguments(const FunctionCallbackInfo<Value>& args) {
123123
}
124124
}
125125

126-
void Initialize(Local<Object> target) {
126+
void Initialize(Local<Object> target,
127+
Local<Value> module,
128+
void* data) {
127129
NODE_SET_METHOD(target, "callWithString", CallWithString);
128130
NODE_SET_METHOD(target, "callWithLongString", CallWithString);
129131

benchmark/napi/function_call/binding.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ void Hello(const v8::FunctionCallbackInfo<v8::Value>& args) {
77
args.GetReturnValue().Set(c++);
88
}
99

10-
void Initialize(v8::Local<v8::Object> target) {
10+
void Initialize(v8::Local<v8::Object> target,
11+
v8::Local<v8::Value> module,
12+
void* data) {
1113
NODE_SET_METHOD(target, "hello", Hello);
1214
}
1315

0 commit comments

Comments
 (0)