mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 16:42:21 -05:00
chore: upgrade rusty_v8 to 0.58.0 (#16879)
This commit is contained in:
parent
623dbe7a57
commit
381932ce1e
6 changed files with 8 additions and 9 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -5388,9 +5388,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "v8"
|
name = "v8"
|
||||||
version = "0.57.0"
|
version = "0.58.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "293cb302608e408948274638627411722c394926a975923a5ca2ec573ed7132e"
|
checksum = "8e9b88668afedf6ec9f8f6d30b446f622498da2ef0b3991a52e10f0ea8c6cc09"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"fslock",
|
"fslock",
|
||||||
|
|
|
@ -40,7 +40,7 @@ license = "MIT"
|
||||||
repository = "https://github.com/denoland/deno"
|
repository = "https://github.com/denoland/deno"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[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_ast = { version = "0.21.0", features = ["transpiling"] }
|
||||||
|
|
||||||
deno_core = { version = "0.161.0", path = "./core" }
|
deno_core = { version = "0.161.0", path = "./core" }
|
||||||
|
|
|
@ -1260,11 +1260,10 @@ fn napi_delete_reference(env: *mut Env, _nref: napi_ref) -> Result {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[napi_sym::napi_sym]
|
#[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 value = transmute::<napi_value, v8::Local<v8::Value>>(value);
|
||||||
let ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap();
|
let ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap();
|
||||||
ab.detach(v8::undefined(&mut env.scope()).into());
|
ab.detach(None);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -472,7 +472,7 @@ fn op_serialize(
|
||||||
}
|
}
|
||||||
|
|
||||||
let backing_store = buf.get_backing_store();
|
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);
|
let id = shared_array_buffer_store.insert(backing_store);
|
||||||
value_serializer.transfer_array_buffer(id, buf);
|
value_serializer.transfer_array_buffer(id, buf);
|
||||||
let id = v8::Number::new(scope, id as f64).into();
|
let id = v8::Number::new(scope, id as f64).into();
|
||||||
|
|
|
@ -383,7 +383,7 @@ fn op_transfer_arraybuffer<'a>(
|
||||||
return Err(type_error("ArrayBuffer is not detachable"));
|
return Err(type_error("ArrayBuffer is not detachable"));
|
||||||
}
|
}
|
||||||
let bs = ab.get_backing_store();
|
let bs = ab.get_backing_store();
|
||||||
ab.detach(v8::undefined(scope).into());
|
ab.detach(None);
|
||||||
let ab = v8::ArrayBuffer::with_backing_store(scope, &bs);
|
let ab = v8::ArrayBuffer::with_backing_store(scope, &bs);
|
||||||
Ok(serde_v8::Value {
|
Ok(serde_v8::Value {
|
||||||
v8_value: ab.into(),
|
v8_value: ab.into(),
|
||||||
|
|
|
@ -63,7 +63,7 @@ impl FromV8 for DetachedBuffer {
|
||||||
return Err(crate::Error::ExpectedDetachable);
|
return Err(crate::Error::ExpectedDetachable);
|
||||||
}
|
}
|
||||||
let store = b.get_backing_store();
|
let store = b.get_backing_store();
|
||||||
b.detach(v8::undefined(scope).into()); // Detach
|
b.detach(None); // Detach
|
||||||
Ok(Self(V8Slice { store, range }))
|
Ok(Self(V8Slice { store, range }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue