Skip to content

Commit

Permalink
src: fix deprecation warning in node_perf.cc
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
danbev authored and MylesBorins committed Aug 16, 2018
1 parent 2f6866e commit e194c37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit e194c37

Please sign in to comment.