diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-12 05:37:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-12 05:37:37 +0100 |
commit | b88b7c92443aeacc269f9823a8ced06b08018f8a (patch) | |
tree | f4e0d6c161a6d84cd07404c35c7a02d18f1ab219 /cli/napi/js_native_api.rs | |
parent | d81065cff9d2ac64f73ec29edeb6dae1fdf87f04 (diff) |
chore: upgrade rusty_v8 to 0.55.0 (#16604)
<!--
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 'cli/napi/js_native_api.rs')
-rw-r--r-- | cli/napi/js_native_api.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/napi/js_native_api.rs b/cli/napi/js_native_api.rs index 07b583beb..a0605af11 100644 --- a/cli/napi/js_native_api.rs +++ b/cli/napi/js_native_api.rs @@ -1260,10 +1260,11 @@ fn napi_delete_reference(env: *mut Env, _nref: napi_ref) -> Result { } #[napi_sym::napi_sym] -fn napi_detach_arraybuffer(_env: *mut Env, value: napi_value) -> Result { +fn napi_detach_arraybuffer(env: *mut Env, value: napi_value) -> Result { + let env: &mut Env = env.as_mut().ok_or(Error::InvalidArg)?; let value = transmute::<napi_value, v8::Local<v8::Value>>(value); let ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap(); - ab.detach(); + ab.detach(v8::undefined(&mut env.scope()).into()); Ok(()) } |