1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05: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:
Divy Srivastava 2023-02-01 06:48:03 -08:00 committed by GitHub
parent 524bccdf6a
commit 690b6ac39e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,10 +607,6 @@ fn napi_create_function(
check_arg!(env, result);
check_arg_option!(env, cb);
if length > INT_MAX as _ {
return Err(Error::InvalidArg);
}
let name = name
.as_ref()
.map(|_| check_new_from_utf8_len(env, name, length))