From 65500f36e870b4ada3996b06aa287e30177d21a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 7 Feb 2023 13:36:41 +0100 Subject: chore: upgrade rusty_v8 to 0.62.2 (#17604) Co-authored-by: Bert Belder --- core/icudtl.dat | Bin 10454784 -> 10541264 bytes core/inspector.rs | 18 ++++++++++++++++++ core/ops_builtin_v8.rs | 8 ++++---- core/runtime.rs | 4 ++-- 4 files changed, 24 insertions(+), 6 deletions(-) (limited to 'core') diff --git a/core/icudtl.dat b/core/icudtl.dat index dfa97affb..d1f10917a 100644 Binary files a/core/icudtl.dat and b/core/icudtl.dat differ diff --git a/core/inspector.rs b/core/inspector.rs index 2b03d663d..c83784fe3 100644 --- a/core/inspector.rs +++ b/core/inspector.rs @@ -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 } @@ -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 } diff --git a/core/ops_builtin_v8.rs b/core/ops_builtin_v8.rs index a94f8a50b..5ca62c811 100644 --- a/core/ops_builtin_v8.rs +++ b/core/ops_builtin_v8.rs @@ -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(()) diff --git a/core/runtime.rs b/core/runtime.rs index 1bda16f3e..1418e5791 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -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", -- cgit v1.2.3