0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-23 15:50:11 -05:00

Rolling to V8 10.4.132.5 (#1002)

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
This commit is contained in:
denobot 2022-06-14 16:26:50 -06:00 committed by GitHub
parent d05949e6b1
commit c53d85114e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 9 deletions

View file

@ -103,7 +103,7 @@ name = "shell"
name = "process"
[[test]]
name = "buid"
name = "build"
path = "build.rs"
[workspace]

View file

@ -1,6 +1,6 @@
# Rusty V8 Binding
V8 Version: 10.3.174.8
V8 Version: 10.4.132.5
[![ci](https://github.com/denoland/rusty_v8/workflows/ci/badge.svg?branch=main)](https://github.com/denoland/rusty_v8/actions)
[![crates](https://img.shields.io/crates/v/v8.svg)](https://crates.io/crates/v8)

View file

@ -292,7 +292,7 @@ int64_t v8__Isolate__AdjustAmountOfExternalAllocatedMemory(
}
void v8__Isolate__SetOOMErrorHandler(v8::Isolate* isolate,
v8::LegacyOOMErrorCallback callback) {
v8::OOMErrorCallback callback) {
isolate->SetOOMErrorHandler(callback);
}

View file

@ -151,8 +151,14 @@ pub type NearHeapLimitCallback = extern "C" fn(
initial_heap_limit: usize,
) -> usize;
pub type LegacyOomErrorCallback =
extern "C" fn(location: *const c_char, is_heap_oom: bool);
#[repr(C)]
pub struct OomDetails {
pub is_heap_oom: bool,
pub detail: *const c_char,
}
pub type OomErrorCallback =
extern "C" fn(location: *const c_char, details: &OomDetails);
/// Collection of V8 heap information.
///
@ -212,7 +218,7 @@ extern "C" {
);
fn v8__Isolate__SetOOMErrorHandler(
isolate: *mut Isolate,
callback: LegacyOomErrorCallback,
callback: OomErrorCallback,
);
fn v8__Isolate__AdjustAmountOfExternalAllocatedMemory(
isolate: *mut Isolate,
@ -727,7 +733,7 @@ impl Isolate {
}
}
pub fn set_oom_error_handler(&mut self, callback: LegacyOomErrorCallback) {
pub fn set_oom_error_handler(&mut self, callback: OomErrorCallback) {
unsafe { v8__Isolate__SetOOMErrorHandler(self, callback) };
}

View file

@ -100,6 +100,8 @@ pub use isolate::IsolateHandle;
pub use isolate::MessageCallback;
pub use isolate::MicrotasksPolicy;
pub use isolate::NearHeapLimitCallback;
pub use isolate::OomDetails;
pub use isolate::OomErrorCallback;
pub use isolate::OwnedIsolate;
pub use isolate::PromiseHook;
pub use isolate::PromiseHookType;

View file

@ -5636,7 +5636,10 @@ fn run_with_rust_allocator() {
#[test]
fn oom_callback() {
extern "C" fn oom_handler(_: *const std::os::raw::c_char, _: bool) {
extern "C" fn oom_handler(
_: *const std::os::raw::c_char,
_: &v8::OomDetails,
) {
unreachable!()
}

2
v8

@ -1 +1 @@
Subproject commit ae2661fe05354ba2115a66c8a63ef3aef0059c9d
Subproject commit a5ae0382548204c60025cb26618231ba48ad83f1