Skip to content

Commit 3ee556a

Browse files
Gabriel Schulhofcodebytere
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 <[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]>
1 parent 2d24912 commit 3ee556a

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)