test: pass null params to napi_create_function()#26998
Closed
octaviansoldea wants to merge 1 commit intonodejs:masterfrom
Closed
test: pass null params to napi_create_function()#26998octaviansoldea wants to merge 1 commit intonodejs:masterfrom
octaviansoldea wants to merge 1 commit intonodejs:masterfrom
Conversation
Each one of the following arguments is checked: napi_env env, const char* utf8name, napi_callback cb, napi_value* result.
gabrielschulhof
approved these changes
Mar 31, 2019
Contributor
gabrielschulhof
left a comment
There was a problem hiding this comment.
LGTM with a few nits.
| &result); | ||
|
|
||
| ret[1] = napi_create_function(env, | ||
| NULL, |
Contributor
There was a problem hiding this comment.
Nit: this and the lines below need a few more spaces of indentation.
| static napi_value TestCreateFunctionParameters(napi_env env, | ||
| napi_callback_info info) { | ||
| napi_status ret[4]; | ||
| napi_value result, return_value = NULL, prop_value; |
Contributor
There was a problem hiding this comment.
Nit: we can forego the initalizer here.
Contributor
1 similar comment
Collaborator
Member
|
@octaviansoldea PTAL @gabrielschulhof would you also be fine to land this as is without your comments being addressed? |
Contributor
|
@BridgeAR I'm OK with that. I'm surprised the linter hasn't caught any of this. |
Collaborator
Collaborator
Collaborator
Contributor
|
Landed in 06c803d. |
gabrielschulhof
pushed a commit
that referenced
this pull request
Apr 10, 2019
Each one of the following arguments is checked: napi_env env, const char* utf8name, napi_callback cb, napi_value* result. PR-URL: #26998 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
This was referenced Apr 23, 2019
octaviansoldea
pushed a commit
to octaviansoldea/node
that referenced
this pull request
Jul 28, 2019
PR-URL: nodejs#26998 This is a refactoring of nodejs#26998 following nodejs#28505. The functions `add_last_status()` and `add_returned_status()` are now reused, see also nodejs#28848. PR-URL: nodejs#26998 PR-URL: nodejs#28505 PR-URL: nodejs#28848
3 tasks
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Aug 1, 2019
This is a refactoring of nodejs#26998 following nodejs#28505. The functions `add_last_status()` and `add_returned_status()` are now reused, see also nodejs#28848. PR-URL: nodejs#28894 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos
pushed a commit
that referenced
this pull request
Aug 2, 2019
This is a refactoring of #26998 following #28505. The functions `add_last_status()` and `add_returned_status()` are now reused, see also #28848. PR-URL: #28894 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.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.
Each one of the following arguments is checked:
napi_env env,
const char* utf8name,
napi_callback cb,
napi_value* result.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes