n-api: factor out calling pattern#36113
Closed
gabrielschulhof wants to merge 3 commits intonodejs:masterfrom
Closed
n-api: factor out calling pattern#36113gabrielschulhof wants to merge 3 commits intonodejs:masterfrom
gabrielschulhof wants to merge 3 commits intonodejs:masterfrom
Conversation
Factor out how we handle a `napi_status`-valued return internally. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Collaborator
|
Review requested:
|
Trott
approved these changes
Nov 14, 2020
addaleax
reviewed
Nov 15, 2020
legendecas
reviewed
Nov 15, 2020
| 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?
Contributor
Author
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
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>
Contributor
Author
|
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 free
to 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