Skip to content

Commit

Permalink
test: fix deprecation warning in binding.cc
Browse files Browse the repository at this point in the history
Currently, the make-callback-domain-warning addon generates the
following warning:
../binding.cc:22:9:
warning: 'MakeCallback' is deprecated: Use MakeCallback(...,
      async_context) [-Wdeprecated-declarations]
  node::MakeCallback(isolate, recv, method, 0, nullptr);
        ^
../../../../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 fixes this warning.

PR-URL: #18877
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
  • Loading branch information
danbev authored and MylesBorins committed Aug 16, 2018
1 parent e194c37 commit 78e79c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/addons/make-callback-recurse/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ void MakeCallback(const FunctionCallbackInfo<Value>& args) {
Local<Object> recv = args[0].As<Object>();
Local<Function> method = args[1].As<Function>();

node::MakeCallback(isolate, recv, method, 0, nullptr);
node::MakeCallback(isolate, recv, method, 0, nullptr,
node::async_context{0, 0});
}

void Initialize(Local<Object> exports) {
Expand Down

0 comments on commit 78e79c7

Please sign in to comment.