-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Call() instead of MakeCallback() in AsyncWorker #361
Conversation
Change `AsyncWorker::OnOK()` and `AsyncWorker::OnError()` callbacks to **NOT** use `MakeCallback()`. An ordinary function call (`_callback::Call()`) is now correct. Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback
I agree with your solution in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think this is good. Checked 6.x and it seems like we have a backport for CallbackScope and looks like the required pieces are in place.
Change `AsyncWorker::OnOK()` and `AsyncWorker::OnError()` callbacks to **NOT** use `MakeCallback()`. An ordinary function call (`_callback::Call()`) is now correct. PR-URL: #361 Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Landed as fa3a615 |
Change `AsyncWorker::OnOK()` and `AsyncWorker::OnError()` callbacks to **NOT** use `MakeCallback()`. An ordinary function call (`_callback::Call()`) is now correct. PR-URL: nodejs/node-addon-api#361 Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Change `AsyncWorker::OnOK()` and `AsyncWorker::OnError()` callbacks to **NOT** use `MakeCallback()`. An ordinary function call (`_callback::Call()`) is now correct. PR-URL: nodejs/node-addon-api#361 Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Change `AsyncWorker::OnOK()` and `AsyncWorker::OnError()` callbacks to **NOT** use `MakeCallback()`. An ordinary function call (`_callback::Call()`) is now correct. PR-URL: nodejs/node-addon-api#361 Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Change `AsyncWorker::OnOK()` and `AsyncWorker::OnError()` callbacks to **NOT** use `MakeCallback()`. An ordinary function call (`_callback::Call()`) is now correct. PR-URL: nodejs/node-addon-api#361 Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Change
AsyncWorker::OnOK()
andAsyncWorker::OnError()
callbacks toNOT use
MakeCallback()
. An ordinary function call(
_callback::Call()
) is now correct.Refs: https://nodejs.org/api/n-api.html#n_api_napi_make_callback