1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 08:33:43 -05:00

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

4
Cargo.lock generated
View file

@ -5388,9 +5388,9 @@ dependencies = [
[[package]]
name = "v8"
version = "0.57.0"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "293cb302608e408948274638627411722c394926a975923a5ca2ec573ed7132e"
checksum = "8e9b88668afedf6ec9f8f6d30b446f622498da2ef0b3991a52e10f0ea8c6cc09"
dependencies = [
"bitflags",
"fslock",

View file

@ -40,7 +40,7 @@ license = "MIT"
repository = "https://github.com/denoland/deno"
[workspace.dependencies]
v8 = { version = "0.57.0", default-features = false }
v8 = { version = "0.58.0", default-features = false }
deno_ast = { version = "0.21.0", features = ["transpiling"] }
deno_core = { version = "0.161.0", path = "./core" }

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(())
}

View file

@ -472,7 +472,7 @@ fn op_serialize(
}
let backing_store = buf.get_backing_store();
buf.detach(v8::undefined(scope).into());
buf.detach(None);
let id = shared_array_buffer_store.insert(backing_store);
value_serializer.transfer_array_buffer(id, buf);
let id = v8::Number::new(scope, id as f64).into();

View file

@ -383,7 +383,7 @@ fn op_transfer_arraybuffer<'a>(
return Err(type_error("ArrayBuffer is not detachable"));
}
let bs = ab.get_backing_store();
ab.detach(v8::undefined(scope).into());
ab.detach(None);
let ab = v8::ArrayBuffer::with_backing_store(scope, &bs);
Ok(serde_v8::Value {
v8_value: ab.into(),

View file

@ -63,7 +63,7 @@ impl FromV8 for DetachedBuffer {
return Err(crate::Error::ExpectedDetachable);
}
let store = b.get_backing_store();
b.detach(v8::undefined(scope).into()); // Detach
b.detach(None); // Detach
Ok(Self(V8Slice { store, range }))
}
}