Uh oh!
There was an error while loading. Please reload this page.
n-api: factor out calling pattern - #36113
Closed
gabrielschulhof wants to merge 3 commits into
Closed
Conversation
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
nodejs-github-bot
commented
Nov 13, 2020
Collaborator
Review requested:
|
gabrielschulhof
requested review from
Qard, addaleax and mhdawson
and removed request for
addaleaxNovember 13, 2020 21:21
Trott
approved these changes
Nov 14, 2020
Uh oh!
There was an error while loading. Please reload this page.
| v8impl::V8NameFromPropertyDescriptor(env, p, &property_name); | ||
| if (status != napi_ok) { | ||
| return napi_set_last_error(env, status); |
Member
There was a problem hiding this comment.
STATUS_CALL simply returns on non-napi_ok without calling napi_set_last_error. The behavior seems not equivalent with the change. Is this intentional?
ContributorAuthor
There was a problem hiding this comment.
@legendecas yes, it is, because it is assumed that whichever call returned non-napi_ok did so via return napi_set_last_error(napi_<not_ok>); I checked to make sure that was the case in all locations where I made the change.
Remove semicolon from macro definition Co-authored-by: Anna Henningsen <github@addaleax.net>
Qard
approved these changes
Nov 15, 2020
nodejs-github-bot
commented
Nov 16, 2020
Collaborator
gabrielschulhof pushed a commit
that referenced
this pull request
Nov 16, 2020
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #36113 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
gabrielschulhof
commented
Nov 16, 2020
ContributorAuthor
Landed in 2fd2235. |
codebytere pushed a commit
that referenced
this pull request
Nov 22, 2020
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #36113 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Merged
BethGriggs pushed a commit
that referenced
this pull request
Dec 9, 2020
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #36113 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
BethGriggs pushed a commit
that referenced
this pull request
Dec 10, 2020
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #36113 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Merged
BethGriggs pushed a commit
that referenced
this pull request
Dec 15, 2020
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #36113 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Factor out how we handle a
napi_status-valued return internally.Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes