chore: upgrade rusty_v8 to 0.58.0 (#16879)

This commit is contained in:
Bartek Iwańczuk 2022-11-30 23:20:18 +01:00 committed by GitHub
parent 623dbe7a57
commit 381932ce1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 9 deletions

View file

@ -1260,11 +1260,10 @@ 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 {
let env: &mut Env = env.as_mut().ok_or(Error::InvalidArg)?;
fn napi_detach_arraybuffer(_env: *mut Env, value: napi_value) -> Result {
let value = transmute::<napi_value, v8::Local<v8::Value>>(value);
let ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap();
ab.detach(v8::undefined(&mut env.scope()).into());
ab.detach(None);
Ok(())
}