mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 01:52:56 +00:00
fix(napi): remove wrong length check in napi_create_function (#17614)
This check is not needed. This PR + #17613 makes `npm:ref-napi` work with Deno.
This commit is contained in:
parent
524bccdf6a
commit
690b6ac39e
1 changed files with 0 additions and 4 deletions
|
@ -607,10 +607,6 @@ fn napi_create_function(
|
||||||
check_arg!(env, result);
|
check_arg!(env, result);
|
||||||
check_arg_option!(env, cb);
|
check_arg_option!(env, cb);
|
||||||
|
|
||||||
if length > INT_MAX as _ {
|
|
||||||
return Err(Error::InvalidArg);
|
|
||||||
}
|
|
||||||
|
|
||||||
let name = name
|
let name = name
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|_| check_new_from_utf8_len(env, name, length))
|
.map(|_| check_new_from_utf8_len(env, name, length))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue