summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-10-20 21:01:49 +0200
committerGitHub <noreply@github.com>2022-10-20 21:01:49 +0200
commit869acee8fb801191e87c39641e883fa455811f02 (patch)
treef14d1c90a81fba151b5dae382272a334956a5743
parentda906de18437318527ae368932c2c8663db44f76 (diff)
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. -->
-rw-r--r--Cargo.lock4
-rw-r--r--core/Cargo.toml2
-rw-r--r--core/bindings.rs2
-rw-r--r--ext/ffi/lib.rs3
-rw-r--r--ext/flash/lib.rs9
-rw-r--r--ext/napi/function.rs9
-rw-r--r--ops/lib.rs4
-rw-r--r--serde_v8/Cargo.toml2
8 files changed, 15 insertions, 20 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 4e7382f0f..b1550a044 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5347,9 +5347,9 @@ dependencies = [
[[package]]
name = "v8"
-version = "0.53.1"
+version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e952e936bcb610c9f22997f50dc7f65887afe76e1fedd37daf532a20211335ca"
+checksum = "3b63103bd7caa4c3571e8baafe58f3e04818df70505304ed814737e655d1d8d6"
dependencies = [
"bitflags",
"fslock",
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 0a1b1208a..9540157ac 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -34,7 +34,7 @@ serde_json = { version = "1.0.79", features = ["preserve_order"] }
serde_v8 = { version = "0.66.0", path = "../serde_v8" }
sourcemap = "6.1"
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]]
name = "http_bench_json_ops"
diff --git a/core/bindings.rs b/core/bindings.rs
index fdd8abf1a..a28a3a132 100644
--- a/core/bindings.rs
+++ b/core/bindings.rs
@@ -343,7 +343,7 @@ fn import_meta_resolve(
}
let specifier = maybe_arg_str.unwrap();
let referrer = {
- let url_prop = args.data().unwrap();
+ let url_prop = args.data();
url_prop.to_rust_string_lossy(scope)
};
let module_map_rc = JsRuntime::module_map(scope);
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index 3ad75e245..3de204ef3 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -706,8 +706,7 @@ fn make_sync_fn<'s>(
|scope: &mut v8::HandleScope,
args: v8::FunctionCallbackArguments,
mut rv: v8::ReturnValue| {
- let external: v8::Local<v8::External> =
- args.data().unwrap().try_into().unwrap();
+ let external: v8::Local<v8::External> = args.data().try_into().unwrap();
// SAFETY: The pointer will not be deallocated until the function is
// garbage collected.
let symbol = unsafe { &*(external.value() as *const Symbol) };
diff --git a/ext/flash/lib.rs b/ext/flash/lib.rs
index 17e3e8317..9cff7d2fc 100644
--- a/ext/flash/lib.rs
+++ b/ext/flash/lib.rs
@@ -539,8 +539,7 @@ fn op_flash_make_request<'scope>(
|_: &mut v8::HandleScope,
args: v8::FunctionCallbackArguments,
mut rv: v8::ReturnValue| {
- let external: v8::Local<v8::External> =
- args.data().unwrap().try_into().unwrap();
+ let external: v8::Local<v8::External> = args.data().try_into().unwrap();
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
rv.set_uint32(next_request_sync(ctx));
@@ -561,8 +560,7 @@ fn op_flash_make_request<'scope>(
|scope: &mut v8::HandleScope,
args: v8::FunctionCallbackArguments,
mut rv: v8::ReturnValue| {
- let external: v8::Local<v8::External> =
- args.data().unwrap().try_into().unwrap();
+ let external: v8::Local<v8::External> = args.data().try_into().unwrap();
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
let token = args.get(0).uint32_value(scope).unwrap();
@@ -585,8 +583,7 @@ fn op_flash_make_request<'scope>(
|scope: &mut v8::HandleScope,
args: v8::FunctionCallbackArguments,
mut rv: v8::ReturnValue| {
- let external: v8::Local<v8::External> =
- args.data().unwrap().try_into().unwrap();
+ let external: v8::Local<v8::External> = args.data().try_into().unwrap();
// SAFETY: This external is guaranteed to be a pointer to a ServerContext
let ctx = unsafe { &mut *(external.value() as *mut ServerContext) };
diff --git a/ext/napi/function.rs b/ext/napi/function.rs
index 853283b08..edeed2566 100644
--- a/ext/napi/function.rs
+++ b/ext/napi/function.rs
@@ -27,13 +27,12 @@ impl CallbackInfo {
}
extern "C" fn call_fn(info: *const v8::FunctionCallbackInfo) {
- let args =
- unsafe { v8::FunctionCallbackArguments::from_function_callback_info(info) };
- let mut rv = unsafe { v8::ReturnValue::from_function_callback_info(info) };
+ let info = unsafe { &*info };
+ let args = v8::FunctionCallbackArguments::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.
let info_ptr: *mut CallbackInfo = unsafe {
- let external_value =
- v8::Local::<v8::External>::cast(args.data().unwrap_unchecked());
+ let external_value = v8::Local::<v8::External>::cast(args.data());
external_value.value() as _
};
diff --git a/ops/lib.rs b/ops/lib.rs
index adc50e69c..e8ea1e969 100644
--- a/ops/lib.rs
+++ b/ops/lib.rs
@@ -229,7 +229,7 @@ fn codegen_v8_async(
use #core::futures::FutureExt;
// SAFETY: #core guarantees args.data() is a v8 External pointing to an OpCtx for the isolates lifetime
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)
};
let op_id = ctx.id;
@@ -557,7 +557,7 @@ fn codegen_v8_sync(
quote! {
// SAFETY: #core guarantees args.data() is a v8 External pointing to an OpCtx for the isolates lifetime
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)
};
diff --git a/serde_v8/Cargo.toml b/serde_v8/Cargo.toml
index fd4f1a4c8..bba333ffb 100644
--- a/serde_v8/Cargo.toml
+++ b/serde_v8/Cargo.toml
@@ -18,7 +18,7 @@ derive_more = "0.99.17"
serde = { version = "1.0.136", features = ["derive"] }
serde_bytes = "0.11"
smallvec = { version = "1.8", features = ["union"] }
-v8 = { version = "0.53.1", default-features = false }
+v8 = { version = "0.54.0", default-features = false }
[dev-dependencies]
bencher = "0.1"