mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
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. -->
This commit is contained in:
parent
da906de184
commit
869acee8fb
8 changed files with 15 additions and 20 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -5347,9 +5347,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "v8"
|
name = "v8"
|
||||||
version = "0.53.1"
|
version = "0.54.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e952e936bcb610c9f22997f50dc7f65887afe76e1fedd37daf532a20211335ca"
|
checksum = "3b63103bd7caa4c3571e8baafe58f3e04818df70505304ed814737e655d1d8d6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"fslock",
|
"fslock",
|
||||||
|
|
|
@ -34,7 +34,7 @@ serde_json = { version = "1.0.79", features = ["preserve_order"] }
|
||||||
serde_v8 = { version = "0.66.0", path = "../serde_v8" }
|
serde_v8 = { version = "0.66.0", path = "../serde_v8" }
|
||||||
sourcemap = "6.1"
|
sourcemap = "6.1"
|
||||||
url = { version = "2.3.1", features = ["serde", "expose_internals"] }
|
url = { version = "2.3.1", features = ["serde", "expose_internals"] }
|
||||||
v8 = { version = "0.53.1", default-features = false }
|
v8 = { version = "0.54.0", default-features = false }
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "http_bench_json_ops"
|
name = "http_bench_json_ops"
|
||||||
|
|
|
@ -343,7 +343,7 @@ fn import_meta_resolve(
|
||||||
}
|
}
|
||||||
let specifier = maybe_arg_str.unwrap();
|
let specifier = maybe_arg_str.unwrap();
|
||||||
let referrer = {
|
let referrer = {
|
||||||
let url_prop = args.data().unwrap();
|
let url_prop = args.data();
|
||||||
url_prop.to_rust_string_lossy(scope)
|
url_prop.to_rust_string_lossy(scope)
|
||||||
};
|
};
|
||||||
let module_map_rc = JsRuntime::module_map(scope);
|
let module_map_rc = JsRuntime::module_map(scope);
|
||||||
|
|
|
@ -706,8 +706,7 @@ fn make_sync_fn<'s>(
|
||||||
|scope: &mut v8::HandleScope,
|
|scope: &mut v8::HandleScope,
|
||||||
args: v8::FunctionCallbackArguments,
|
args: v8::FunctionCallbackArguments,
|
||||||
mut rv: v8::ReturnValue| {
|
mut rv: v8::ReturnValue| {
|
||||||
let external: v8::Local<v8::External> =
|
let external: v8::Local<v8::External> = args.data().try_into().unwrap();
|
||||||
args.data().unwrap().try_into().unwrap();
|
|
||||||
// SAFETY: The pointer will not be deallocated until the function is
|
// SAFETY: The pointer will not be deallocated until the function is
|
||||||
// garbage collected.
|
// garbage collected.
|
||||||
let symbol = unsafe { &*(external.value() as *const Symbol) };
|
let symbol = unsafe { &*(external.value() as *const Symbol) };
|
||||||
|
|
|
@ -539,8 +539,7 @@ fn op_flash_make_request<'scope>(
|
||||||
|_: &mut v8::HandleScope,
|
|_: &mut v8::HandleScope,
|
||||||
args: v8::FunctionCallbackArguments,
|
args: v8::FunctionCallbackArguments,
|
||||||
mut rv: v8::ReturnValue| {
|
mut rv: v8::ReturnValue| {
|
||||||
let external: v8::Local<v8::External> =
|
let external: v8::Local<v8::External> = args.data().try_into().unwrap();
|
||||||
args.data().unwrap().try_into().unwrap();
|
|
||||||
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
|
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
|
||||||
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
|
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
|
||||||
rv.set_uint32(next_request_sync(ctx));
|
rv.set_uint32(next_request_sync(ctx));
|
||||||
|
@ -561,8 +560,7 @@ fn op_flash_make_request<'scope>(
|
||||||
|scope: &mut v8::HandleScope,
|
|scope: &mut v8::HandleScope,
|
||||||
args: v8::FunctionCallbackArguments,
|
args: v8::FunctionCallbackArguments,
|
||||||
mut rv: v8::ReturnValue| {
|
mut rv: v8::ReturnValue| {
|
||||||
let external: v8::Local<v8::External> =
|
let external: v8::Local<v8::External> = args.data().try_into().unwrap();
|
||||||
args.data().unwrap().try_into().unwrap();
|
|
||||||
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
|
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
|
||||||
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
|
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
|
||||||
let token = args.get(0).uint32_value(scope).unwrap();
|
let token = args.get(0).uint32_value(scope).unwrap();
|
||||||
|
@ -585,8 +583,7 @@ fn op_flash_make_request<'scope>(
|
||||||
|scope: &mut v8::HandleScope,
|
|scope: &mut v8::HandleScope,
|
||||||
args: v8::FunctionCallbackArguments,
|
args: v8::FunctionCallbackArguments,
|
||||||
mut rv: v8::ReturnValue| {
|
mut rv: v8::ReturnValue| {
|
||||||
let external: v8::Local<v8::External> =
|
let external: v8::Local<v8::External> = args.data().try_into().unwrap();
|
||||||
args.data().unwrap().try_into().unwrap();
|
|
||||||
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
|
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
|
||||||
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
|
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,12 @@ impl CallbackInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" fn call_fn(info: *const v8::FunctionCallbackInfo) {
|
extern "C" fn call_fn(info: *const v8::FunctionCallbackInfo) {
|
||||||
let args =
|
let info = unsafe { &*info };
|
||||||
unsafe { v8::FunctionCallbackArguments::from_function_callback_info(info) };
|
let args = v8::FunctionCallbackArguments::from_function_callback_info(info);
|
||||||
let mut rv = unsafe { v8::ReturnValue::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.
|
// SAFETY: create_function guarantees that the data is a CallbackInfo external.
|
||||||
let info_ptr: *mut CallbackInfo = unsafe {
|
let info_ptr: *mut CallbackInfo = unsafe {
|
||||||
let external_value =
|
let external_value = v8::Local::<v8::External>::cast(args.data());
|
||||||
v8::Local::<v8::External>::cast(args.data().unwrap_unchecked());
|
|
||||||
external_value.value() as _
|
external_value.value() as _
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ fn codegen_v8_async(
|
||||||
use #core::futures::FutureExt;
|
use #core::futures::FutureExt;
|
||||||
// SAFETY: #core guarantees args.data() is a v8 External pointing to an OpCtx for the isolates lifetime
|
// SAFETY: #core guarantees args.data() is a v8 External pointing to an OpCtx for the isolates lifetime
|
||||||
let ctx = unsafe {
|
let ctx = unsafe {
|
||||||
&*(#core::v8::Local::<#core::v8::External>::cast(args.data().unwrap_unchecked()).value()
|
&*(#core::v8::Local::<#core::v8::External>::cast(args.data()).value()
|
||||||
as *const #core::_ops::OpCtx)
|
as *const #core::_ops::OpCtx)
|
||||||
};
|
};
|
||||||
let op_id = ctx.id;
|
let op_id = ctx.id;
|
||||||
|
@ -557,7 +557,7 @@ fn codegen_v8_sync(
|
||||||
quote! {
|
quote! {
|
||||||
// SAFETY: #core guarantees args.data() is a v8 External pointing to an OpCtx for the isolates lifetime
|
// SAFETY: #core guarantees args.data() is a v8 External pointing to an OpCtx for the isolates lifetime
|
||||||
let ctx = unsafe {
|
let ctx = unsafe {
|
||||||
&*(#core::v8::Local::<#core::v8::External>::cast(args.data().unwrap_unchecked()).value()
|
&*(#core::v8::Local::<#core::v8::External>::cast(args.data()).value()
|
||||||
as *const #core::_ops::OpCtx)
|
as *const #core::_ops::OpCtx)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ derive_more = "0.99.17"
|
||||||
serde = { version = "1.0.136", features = ["derive"] }
|
serde = { version = "1.0.136", features = ["derive"] }
|
||||||
serde_bytes = "0.11"
|
serde_bytes = "0.11"
|
||||||
smallvec = { version = "1.8", features = ["union"] }
|
smallvec = { version = "1.8", features = ["union"] }
|
||||||
v8 = { version = "0.53.1", default-features = false }
|
v8 = { version = "0.54.0", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bencher = "0.1"
|
bencher = "0.1"
|
||||||
|
|
Loading…
Reference in a new issue