Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
danbev committed Feb 20, 2018
commit 38267bba6661bd5f1bbdb24695db532a4b10f954
3 changes: 2 additions & 1 deletion src/node_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down