Commit 3d03c6e
committed
src: use ToLocal() in napi_create_bigint_words
Replace ToLocalChecked() with MaybeLocal::ToLocal() for
BigInt::NewFromWords. On failure, return
napi_set_last_error(env, napi_generic_failure) to correctly
propagate the error instead of risking a crash.
This aligns with existing error-handling macros and avoids
unchecked conversions.1 parent 0fb0406 commit 3d03c6e
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1828 | 1828 | | |
1829 | 1829 | | |
1830 | 1830 | | |
1831 | | - | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
1832 | 1835 | | |
1833 | | - | |
| 1836 | + | |
1834 | 1837 | | |
1835 | 1838 | | |
1836 | 1839 | | |
| |||
0 commit comments