-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: pass null params to napi_create_function() #26998
test: pass null params to napi_create_function() #26998
Conversation
Each one of the following arguments is checked: napi_env env, const char* utf8name, napi_callback cb, napi_value* result.
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 with a few nits.
&result); | ||
|
||
ret[1] = napi_create_function(env, | ||
NULL, |
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.
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; |
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.
Nit: we can forego the initalizer here.
1 similar comment
@octaviansoldea PTAL @gabrielschulhof would you also be fine to land this as is without your comments being addressed? |
@BridgeAR I'm OK with that. I'm surprised the linter hasn't caught any of this. |
Landed in 06c803d. |
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>
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
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>
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>
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