Skip to content

Commit e194c37

Browse files
danbevMylesBorins
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 2f6866e commit e194c37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_perf.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void PerformanceEntry::Notify(Environment* env,
9292
node::MakeCallback(env->isolate(),
9393
env->process_object(),
9494
env->performance_entry_callback(),
95-
1, &object);
95+
1, &object,
96+
node::async_context{0, 0}).ToLocalChecked();
9697
}
9798
}
9899

0 commit comments

Comments
 (0)