Skip to content
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

test: use assert() in N-API async test #28423

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

The Execute() callback is not allowed to call into JS, so
we should use assert() instead of potentially throwing JS errors.

Fixes: nodejs/help#1998

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

The `Execute()` callback is not allowed to call into JS, so
we should use `assert()` instead of potentially throwing JS errors.

Fixes: nodejs/help#1998
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 25, 2019
@addaleax addaleax added the node-api Issues and PRs related to the Node-API. label Jun 25, 2019
@lpinca lpinca added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 25, 2019
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danbev
Copy link
Contributor

danbev commented Jun 28, 2019

Landed in d11b538.

@danbev danbev closed this Jun 28, 2019
danbev pushed a commit that referenced this pull request Jun 28, 2019
The `Execute()` callback is not allowed to call into JS, so
we should use `assert()` instead of potentially throwing JS errors.

PR-URL: #28423
Fixes: nodejs/help#1998
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
targos pushed a commit that referenced this pull request Jul 2, 2019
The `Execute()` callback is not allowed to call into JS, so
we should use `assert()` instead of potentially throwing JS errors.

PR-URL: #28423
Fixes: nodejs/help#1998
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
targos pushed a commit that referenced this pull request Jul 2, 2019
The `Execute()` callback is not allowed to call into JS, so
we should use `assert()` instead of potentially throwing JS errors.

PR-URL: #28423
Fixes: nodejs/help#1998
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@targos targos mentioned this pull request Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

napi: why napi can be called in async execute function?
10 participants