| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This change throws off the indentation of the following lines.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
This would need a rebase, and since #12366 most of the internals here are wrapped in an anonymous namespace so the statics here would be redundant |
Sorry, something went wrong.
We left out null-checks for many of the parameters passed to our APIs. In particular, arguments of type `napi_value` were often accepted without a null-check, even though they should never be null. Additionally, many APIs simply returned `napi_ok` on success. This leaves in place an error that may have occurred in a previous N-API call. Others (those which perform `NAPI_PREAMBLE(env)` at the top) OTOH explicitly clear the last error before proceeding. With this modification all APIs explicitly clear the last error on success. Fixes nodejs/abi-stable-node#227
|
@addaleax rebased. I believe the static function touched in this PR are outside of a namespace, but you're right, there are now functions in src/node_api.cc which need no longer be static. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Ran out of time today, will plan to land tomorrow (Tuesday) |
Sorry, something went wrong.
Sorry, something went wrong.
|
CI good landing. |
Sorry, something went wrong.
Sorry, something went wrong.
We left out null-checks for many of the parameters passed to our APIs. In particular, arguments of type `napi_value` were often accepted without a null-check, even though they should never be null. Additionally, many APIs simply returned `napi_ok` on success. This leaves in place an error that may have occurred in a previous N-API call. Others (those which perform `NAPI_PREAMBLE(env)` at the top) OTOH explicitly clear the last error before proceeding. With this modification all APIs explicitly clear the last error on success. Fixes: nodejs/abi-stable-node#227 PR-URL: #12539 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
Just got back after lunch and tried to push seeing the CI green, but see @addaleax already has. |
Sorry, something went wrong.
We left out null-checks for many of the parameters passed to our APIs. In particular, arguments of type `napi_value` were often accepted without a null-check, even though they should never be null. Additionally, many APIs simply returned `napi_ok` on success. This leaves in place an error that may have occurred in a previous N-API call. Others (those which perform `NAPI_PREAMBLE(env)` at the top) OTOH explicitly clear the last error before proceeding. With this modification all APIs explicitly clear the last error on success. Fixes: nodejs/abi-stable-node#227 PR-URL: nodejs#12539 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
We left out null-checks for many of the parameters passed to our APIs. In particular, arguments of type `napi_value` were often accepted without a null-check, even though they should never be null. Additionally, many APIs simply returned `napi_ok` on success. This leaves in place an error that may have occurred in a previous N-API call. Others (those which perform `NAPI_PREAMBLE(env)` at the top) OTOH explicitly clear the last error before proceeding. With this modification all APIs explicitly clear the last error on success. Fixes: nodejs/abi-stable-node#227 Backport-PR-URL: #19447 PR-URL: #12539 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
We left out null-checks for many of the parameters passed to our APIs.
In particular, arguments of type napi_value were often accepted
without a null-check, even though they should never be null.
Additionally, many APIs simply returned napi_ok on success. This
leaves in place an error that may have occurred in a previous N-API
call. Others (those which perform NAPI_PREAMBLE(env) at the top)
OTOH explicitly clear the last error before proceeding. With this
modification all APIs explicitly clear the last error on success.
Fixes nodejs/abi-stable-node#227
Checklist
Affected core subsystem(s)
n-api