Skip to content

Commit

Permalink
chore: upgrade rusty_v8 to 0.62.2 (#17604)
Browse files Browse the repository at this point in the history
Co-authored-by: Bert Belder <bertbelder@gmail.com>
  • Loading branch information
bartlomieju and piscisaureus authored Feb 7, 2023
1 parent a4988d0 commit 65500f3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 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 @@ -41,7 +41,7 @@ license = "MIT"
repository = "https://github.com/denoland/deno"

[workspace.dependencies]
v8 = { version = "0.60.1", default-features = false }
v8 = { version = "0.62.2", default-features = false }
deno_ast = { version = "0.23.2", features = ["transpiling"] }

deno_core = { version = "0.171.0", path = "./core" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Error: CompileError: WebAssembly.compile(): expected length: @+10
at file:///[WILDCARD]/close_in_wasm_reactions.js:18:13
Binary file modified core/icudtl.dat
Binary file not shown.
18 changes: 18 additions & 0 deletions core/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ impl v8::inspector::V8InspectorClientImpl for JsRuntimeInspector {
&self.v8_inspector_client
}

unsafe fn base_ptr(
this: *const Self,
) -> *const v8::inspector::V8InspectorClientBase
where
Self: Sized,
{
// SAFETY: this pointer is valid for the whole lifetime of inspector
unsafe { std::ptr::addr_of!((*this).v8_inspector_client) }
}

fn base_mut(&mut self) -> &mut v8::inspector::V8InspectorClientBase {
&mut self.v8_inspector_client
}
Expand Down Expand Up @@ -647,6 +657,14 @@ impl v8::inspector::ChannelImpl for InspectorSession {
&self.v8_channel
}

unsafe fn base_ptr(this: *const Self) -> *const v8::inspector::ChannelBase
where
Self: Sized,
{
// SAFETY: this pointer is valid for the whole lifetime of inspector
unsafe { std::ptr::addr_of!((*this).v8_channel) }
}

fn base_mut(&mut self) -> &mut v8::inspector::ChannelBase {
&mut self.v8_channel
}
Expand Down
8 changes: 4 additions & 4 deletions core/ops_builtin_v8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,10 @@ fn op_set_promise_hooks(
let resolve_hook = v8::Local::new(scope, resolve_hook_global);

scope.get_current_context().set_promise_hooks(
init_hook,
before_hook,
after_hook,
resolve_hook,
Some(init_hook),
Some(before_hook),
Some(after_hook),
Some(resolve_hook),
);

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions core/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ fn v8_init(
) {
// Include 10MB ICU data file.
#[repr(C, align(16))]
struct IcuData([u8; 10454784]);
struct IcuData([u8; 10541264]);
static ICU_DATA: IcuData = IcuData(*include_bytes!("icudtl.dat"));
v8::icu::set_common_data_71(&ICU_DATA.0).unwrap();
v8::icu::set_common_data_72(&ICU_DATA.0).unwrap();

let flags = concat!(
" --wasm-test-streaming",
Expand Down

0 comments on commit 65500f3

Please sign in to comment.