summaryrefslogtreecommitdiff
path: root/cli/napi/js_native_api.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-02-01 06:48:03 -0800
committerGitHub <noreply@github.com>2023-02-01 20:18:03 +0530
commit690b6ac39eaae2f0cbdd714d5b025d865915fd0c (patch)
tree1e61f298a1145020974c9ab42ed2916a044c9675 /cli/napi/js_native_api.rs
parent524bccdf6aa20ee4ba76dc7291d77b4c98fa7e28 (diff)
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.
Diffstat (limited to 'cli/napi/js_native_api.rs')
-rw-r--r--cli/napi/js_native_api.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/cli/napi/js_native_api.rs b/cli/napi/js_native_api.rs
index aefe8dd0d..4dc249fff 100644
--- a/cli/napi/js_native_api.rs
+++ b/cli/napi/js_native_api.rs
@@ -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))