From e194c3782b98373e9245d1386a93266d8bfaac0e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 20 Feb 2018 05:21:05 +0100 Subject: [PATCH] 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 MakeCallback( ^ 1 warning generated. This commit adds an async_context to the call and checks the maybe result. PR-URL: https://github.com/nodejs/node/pull/18877 Reviewed-By: Ali Ijaz Sheikh --- src/node_perf.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_perf.cc b/src/node_perf.cc index 97f351a9748c8b..dd833552850ab4 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -92,7 +92,8 @@ void PerformanceEntry::Notify(Environment* env, node::MakeCallback(env->isolate(), env->process_object(), env->performance_entry_callback(), - 1, &object); + 1, &object, + node::async_context{0, 0}).ToLocalChecked(); } }