From a17d6840e1dde4be8a63b6b3c74ce61e229a7300 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 38dbdaca5adce1..8862e5fab755a1 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -91,7 +91,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(); } }