Skip to content

Commit a17d684

Browse files
danbevaddaleax
authored andcommitted
src: fix deprecation warning in node_perf.cc
Currently the following deprecation warning is produced when compiling node_perf.cc: ./src/node_perf.cc:91:11: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] node::MakeCallback(env->isolate(), ^ ../src/node.h:172:50: note: 'MakeCallback' has been explicitly marked deprecated here NODE_EXTERN v8::Local<v8::Value> MakeCallback( ^ 1 warning generated. This commit adds an async_context to the call and checks the maybe result. PR-URL: #18877 Reviewed-By: Ali Ijaz Sheikh <[email protected]>
1 parent aec66c6 commit a17d684

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_perf.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ void PerformanceEntry::Notify(Environment* env,
9191
node::MakeCallback(env->isolate(),
9292
env->process_object(),
9393
env->performance_entry_callback(),
94-
1, &object);
94+
1, &object,
95+
node::async_context{0, 0}).ToLocalChecked();
9596
}
9697
}
9798

0 commit comments

Comments
 (0)