Rolling to V8 12.7.224.1 (#1502)

* Rolling to V8 12.7.224.1

* fix eb0bb2596a

* idk

---------

Co-authored-by: snek <snek@deno.com>
This commit is contained in:
denobot 2024-06-13 07:27:05 +09:00 committed by GitHub
parent 37023e66cc
commit 4f03751d4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 12 deletions

View File

@ -1,6 +1,6 @@
# Rusty V8 Binding
V8 Version: 12.6.228.16
V8 Version: 12.7.224.1
[![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

@ -2232,6 +2232,11 @@ const extern int v8__PropertyCallbackInfo__kArgsLength = 7;
// NOTE(bartlomieju): V8 made this field private in 11.4
// v8::PropertyCallbackInfo<v8::Value>::kArgsLength;
const v8::Value* v8__FunctionCallbackInfo__Data(
const v8::FunctionCallbackInfo<v8::Value>& self) {
return local_to_ptr(self.Data());
}
bool v8__PropertyCallbackInfo__ShouldThrowOnError(
const v8::PropertyCallbackInfo<v8::Value>& self) {
return self.ShouldThrowOnError();

View File

@ -64,6 +64,10 @@ extern "C" {
static v8__PropertyCallbackInfo__kArgsLength: int;
fn v8__FunctionCallbackInfo__Data(
this: *const FunctionCallbackInfo,
) -> *const Value;
fn v8__PropertyCallbackInfo__ShouldThrowOnError(
this: *const PropertyCallbackInfo,
) -> bool;
@ -201,9 +205,9 @@ pub struct FunctionCallbackInfo {
impl FunctionCallbackInfo {
const kHolderIndex: i32 = 0;
const kIsolateIndex: i32 = 1;
const kReturnValueDefaultValueIndex: i32 = 2;
const kUnusedIndex: i32 = 2;
const kReturnValueIndex: i32 = 3;
const kDataIndex: i32 = 4;
const kTargetIndex: i32 = 4;
const kNewTargetIndex: i32 = 5;
const kArgsLength: i32 = 6;
}
@ -238,7 +242,11 @@ impl FunctionCallbackInfo {
#[inline(always)]
pub(crate) fn data(&self) -> Local<Value> {
unsafe { self.get_implicit_arg_local(Self::kDataIndex) }
unsafe {
let ptr = v8__FunctionCallbackInfo__Data(self);
let nn = NonNull::new_unchecked(ptr as *mut Value);
Local::from_non_null(nn)
}
}
#[inline(always)]

View File

@ -117,12 +117,6 @@ impl CreateParams {
self
}
/// Termination is postponed when there is no active SafeForTerminationScope.
pub fn only_terminate_in_safe_scope(mut self, value: bool) -> Self {
self.raw.only_terminate_in_safe_scope = value;
self
}
/// The following parameters describe the offsets for addressing type info
/// for wrapped API objects and are used by the fast C API
/// (for details see v8-fast-api-calls.h).
@ -190,7 +184,6 @@ fn create_param_defaults() {
let params = CreateParams::default();
assert_eq!(params.raw.embedder_wrapper_type_index, -1);
assert_eq!(params.raw.embedder_wrapper_object_index, -1);
assert!(!params.raw.only_terminate_in_safe_scope);
assert!(params.raw.allow_atomics_wait);
}
@ -210,7 +203,7 @@ pub(crate) mod raw {
pub array_buffer_allocator_shared: SharedPtr<ArrayBufferAllocator>,
pub external_references: *const intptr_t,
pub allow_atomics_wait: bool,
pub only_terminate_in_safe_scope: bool,
_only_terminate_in_safe_scope: bool,
pub embedder_wrapper_type_index: int,
pub embedder_wrapper_object_index: int,
_fatal_error_handler: *const Opaque, // FatalErrorCallback