n-api: simplify bigint-from-word creation#34554
Closed
gabrielschulhof wants to merge 1 commit intonodejs:masterfrom
Closed
n-api: simplify bigint-from-word creation#34554gabrielschulhof wants to merge 1 commit intonodejs:masterfrom
gabrielschulhof wants to merge 1 commit intonodejs:masterfrom
Conversation
Macro `CHECK_MAYBE_EMPTY_WITH_PREAMBLE()` does the work of checking the `TryCatch` and returning `napi_pending_exception` so this change reuses it for `napi_create_bigint_words()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Collaborator
MrCheater
suggested changes
Jul 30, 2020
| *result = v8impl::JsValueFromV8LocalValue(b.ToLocalChecked()); | ||
| return napi_clear_last_error(env); | ||
| } | ||
| CHECK_MAYBE_EMPTY_WITH_PREAMBLE(env, b, napi_generic_failure); |
Contributor
Author
There was a problem hiding this comment.
The new test included with this PR tests the correct behaviour of CHECK_MAYBE_EMPTY_WITH_PREAMBLE().
addaleax
approved these changes
Jul 30, 2020
jasnell
approved these changes
Jul 30, 2020
gabrielschulhof
pushed a commit
that referenced
this pull request
Jul 31, 2020
Macro `CHECK_MAYBE_EMPTY_WITH_PREAMBLE()` does the work of checking the `TryCatch` and returning `napi_pending_exception` so this change reuses it for `napi_create_bigint_words()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #34554 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Contributor
Author
|
Landed in 0cc2a54. |
codebytere
pushed a commit
that referenced
this pull request
Aug 5, 2020
Macro `CHECK_MAYBE_EMPTY_WITH_PREAMBLE()` does the work of checking the `TryCatch` and returning `napi_pending_exception` so this change reuses it for `napi_create_bigint_words()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #34554 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Merged
addaleax
pushed a commit
that referenced
this pull request
Sep 22, 2020
Macro `CHECK_MAYBE_EMPTY_WITH_PREAMBLE()` does the work of checking the `TryCatch` and returning `napi_pending_exception` so this change reuses it for `napi_create_bigint_words()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #34554 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
addaleax
pushed a commit
that referenced
this pull request
Sep 22, 2020
Macro `CHECK_MAYBE_EMPTY_WITH_PREAMBLE()` does the work of checking the `TryCatch` and returning `napi_pending_exception` so this change reuses it for `napi_create_bigint_words()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #34554 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Merged
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.
Macro
CHECK_MAYBE_EMPTY_WITH_PREAMBLE()does the work of checkingthe
TryCatchand returningnapi_pending_exceptionso this changereuses it for
napi_create_bigint_words().Signed-off-by: Gabriel Schulhof @gabrielschulhof
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes