Skip to content

Commit

Permalink
chore: upgrade rusty_v8 to 0.98.2 (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju authored Jul 22, 2024
1 parent 665a61d commit 19d2d60
Show file tree
Hide file tree
Showing 56 changed files with 382 additions and 168 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ deno_ops = { version = "0.172.0", path = "./ops" }
serde_v8 = { version = "0.205.0", path = "./serde_v8" }
deno_core_testing = { path = "./testing" }

v8 = { version = "0.98.1", default-features = false }
v8 = { version = "0.98.2", default-features = false }
deno_ast = { version = "=0.40.0", features = ["transpiling"] }
deno_unsync = "0.3.10"
deno_core_icudata = "0.0.73"
Expand Down
4 changes: 2 additions & 2 deletions core/runtime/ops_rust_to_v8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ to_v8!(RustToV8Marker<ArrayBufferMarker, Box<[u8]>>: |buf, scope| {
});
to_v8_fallible!(Box<[u8]>: |buf, scope| {
let len = buf.len();
let ab = unsafe { v8::Local::cast(RustToV8Marker::<ArrayBufferMarker, _>::from(buf).to_v8(scope)) };
let ab = unsafe { v8::Local::cast_unchecked(RustToV8Marker::<ArrayBufferMarker, _>::from(buf).to_v8(scope)) };
v8::Uint8Array::new(scope, ab, 0, len).ok_or_else(|| serde_v8::Error::Message("failed to allocate array".into()))
});
to_v8!(RustToV8Marker<ArrayBufferMarker, Vec<u8>>: |value, scope| {
Expand Down Expand Up @@ -389,7 +389,7 @@ to_v8!(RustToV8Marker<ArrayBufferMarker, BytesMut>: |value, scope| {
});
to_v8_fallible!(BytesMut: |buf, scope| {
let len = buf.len();
let ab = unsafe { v8::Local::cast(RustToV8Marker::<ArrayBufferMarker, _>::from(buf).to_v8(scope)) };
let ab = unsafe { v8::Local::cast_unchecked(RustToV8Marker::<ArrayBufferMarker, _>::from(buf).to_v8(scope)) };
v8::Uint8Array::new(scope, ab, 0, len).ok_or_else(|| serde_v8::Error::Message("failed to allocate array".into()))
});

Expand Down
2 changes: 1 addition & 1 deletion ops/op2/dispatch_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub(crate) fn generate_dispatch_async(
let info: &'s _ = unsafe { &*#info };
let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info(info);
let #opctx: &'s _ = unsafe {
&*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value()
&*(deno_core::v8::Local::<deno_core::v8::External>::cast_unchecked(args.data()).value()
as *const deno_core::_ops::OpCtx)
};
deno_core::_ops::dispatch_metrics_async(#opctx, deno_core::_ops::OpMetricsEvent::Dispatched);
Expand Down
4 changes: 2 additions & 2 deletions ops/op2/dispatch_fast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ pub(crate) fn generate_dispatch_fast(
generator_state.needs_fast_api_callback_options = true;
gs_quote!(generator_state(opctx, fast_api_callback_options) => {
let #opctx: &'s _ = unsafe {
&*(deno_core::v8::Local::<deno_core::v8::External>::cast(unsafe { #fast_api_callback_options.data.data }).value()
&*(deno_core::v8::Local::<deno_core::v8::External>::cast_unchecked(unsafe { #fast_api_callback_options.data.data }).value()
as *const deno_core::_ops::OpCtx)
};
})
Expand Down Expand Up @@ -531,7 +531,7 @@ pub(crate) fn generate_dispatch_fast(
let #fast_api_callback_options: &'s mut _ =
unsafe { &mut *#fast_api_callback_options };
let opctx: &'s _ = unsafe {
&*(deno_core::v8::Local::<deno_core::v8::External>::cast(
&*(deno_core::v8::Local::<deno_core::v8::External>::cast_unchecked(
unsafe { #fast_api_callback_options.data.data }
).value() as *const deno_core::_ops::OpCtx)
};
Expand Down
4 changes: 2 additions & 2 deletions ops/op2/dispatch_slow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub(crate) fn generate_dispatch_slow(
let info: &'s _ = unsafe { &*#info };
let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info(info);
let #opctx: &'s _ = unsafe {
&*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value()
&*(deno_core::v8::Local::<deno_core::v8::External>::cast_unchecked(args.data()).value()
as *const deno_core::_ops::OpCtx)
};

Expand Down Expand Up @@ -220,7 +220,7 @@ pub(crate) fn with_opctx(generator_state: &mut GeneratorState) -> TokenStream {
generator_state.needs_args = true;
gs_quote!(generator_state(opctx, fn_args) =>
(let #opctx: &'s _ = unsafe {
&*(deno_core::v8::Local::<deno_core::v8::External>::cast(#fn_args.data()).value()
&*(deno_core::v8::Local::<deno_core::v8::External>::cast_unchecked(#fn_args.data()).value()
as *const deno_core::_ops::OpCtx)
};)
)
Expand Down
8 changes: 6 additions & 2 deletions ops/op2/test_cases/async/async_arg_return.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions ops/op2/test_cases/async/async_arg_return_result.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions ops/op2/test_cases/async/async_cppgc.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions ops/op2/test_cases/async/async_deferred.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions ops/op2/test_cases/async/async_jsbuffer.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions ops/op2/test_cases/async/async_lazy.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions ops/op2/test_cases/async/async_op_metadata.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions ops/op2/test_cases/async/async_opstate.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions ops/op2/test_cases/async/async_result.out

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 19d2d60

Please sign in to comment.