diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-10-20 21:01:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-20 21:01:49 +0200 |
commit | 869acee8fb801191e87c39641e883fa455811f02 (patch) | |
tree | f14d1c90a81fba151b5dae382272a334956a5743 /ext/napi/function.rs | |
parent | da906de18437318527ae368932c2c8663db44f76 (diff) |
chore: upgrade rusty_v8 to 0.54.0 (#16368)
<!--
Before submitting a PR, please read http://deno.land/manual/contributing
1. Give the PR a descriptive title.
Examples of good title:
- fix(std/http): Fix race condition in server
- docs(console): Update docstrings
- feat(doc): Handle nested reexports
Examples of bad title:
- fix #7123
- update docs
- fix bugs
2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
-->
Diffstat (limited to 'ext/napi/function.rs')
-rw-r--r-- | ext/napi/function.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/napi/function.rs b/ext/napi/function.rs index 853283b08..edeed2566 100644 --- a/ext/napi/function.rs +++ b/ext/napi/function.rs @@ -27,13 +27,12 @@ impl CallbackInfo { } extern "C" fn call_fn(info: *const v8::FunctionCallbackInfo) { - let args = - unsafe { v8::FunctionCallbackArguments::from_function_callback_info(info) }; - let mut rv = unsafe { v8::ReturnValue::from_function_callback_info(info) }; + let info = unsafe { &*info }; + let args = v8::FunctionCallbackArguments::from_function_callback_info(info); + let mut rv = v8::ReturnValue::from_function_callback_info(info); // SAFETY: create_function guarantees that the data is a CallbackInfo external. let info_ptr: *mut CallbackInfo = unsafe { - let external_value = - v8::Local::<v8::External>::cast(args.data().unwrap_unchecked()); + let external_value = v8::Local::<v8::External>::cast(args.data()); external_value.value() as _ }; |