Fix build for v11.4 (#1218)

Updated "build/" submodule and adjusted to V8
API changes.
This commit is contained in:
Bartek Iwańczuk 2023-04-27 01:03:54 +02:00 committed by GitHub
parent 7459d12923
commit 68c0466b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 7 deletions

2
build

@ -1 +1 @@
Subproject commit cf1eb294256dd95a6273cdcf737e8b114a81ad40 Subproject commit 46bd0455280f874964b4ef5543bcce93e7a8656e

View File

@ -49,7 +49,7 @@ static_assert(sizeof(v8::PromiseRejectMessage) == sizeof(size_t) * 3,
static_assert(sizeof(v8::Locker) == sizeof(size_t) * 2, "Locker size mismatch"); static_assert(sizeof(v8::Locker) == sizeof(size_t) * 2, "Locker size mismatch");
static_assert(sizeof(v8::ScriptCompiler::Source) == static_assert(sizeof(v8::ScriptCompiler::Source) ==
align_to<size_t>(sizeof(size_t) * 6 + sizeof(int) * 3), align_to<size_t>(sizeof(size_t) * 9 + sizeof(int) * 2),
"Source size mismatch"); "Source size mismatch");
static_assert(sizeof(v8::FunctionCallbackInfo<v8::Value>) == sizeof(size_t) * 3, static_assert(sizeof(v8::FunctionCallbackInfo<v8::Value>) == sizeof(size_t) * 3,
@ -1988,11 +1988,13 @@ const v8::ObjectTemplate* v8__FunctionTemplate__InstanceTemplate(
return local_to_ptr(ptr_to_local(&self)->InstanceTemplate()); return local_to_ptr(ptr_to_local(&self)->InstanceTemplate());
} }
const extern int v8__FunctionCallbackInfo__kArgsLength = const extern int v8__FunctionCallbackInfo__kArgsLength = 6;
v8::FunctionCallbackInfo<v8::Value>::kArgsLength; // NOTE(bartlomieju): V8 made this field private in 11.4
// v8::FunctionCallbackInfo<v8::Value>::kArgsLength;
const extern int v8__PropertyCallbackInfo__kArgsLength = const extern int v8__PropertyCallbackInfo__kArgsLength = 7;
v8::PropertyCallbackInfo<v8::Value>::kArgsLength; // NOTE(bartlomieju): V8 made this field private in 11.4
// v8::PropertyCallbackInfo<v8::Value>::kArgsLength;
bool v8__PropertyCallbackInfo__ShouldThrowOnError( bool v8__PropertyCallbackInfo__ShouldThrowOnError(
const v8::PropertyCallbackInfo<v8::Value>& self) { const v8::PropertyCallbackInfo<v8::Value>& self) {

View File

@ -543,7 +543,7 @@ impl Isolate {
// Byte offset inside `Isolate` where the isolate data slots are stored. This // Byte offset inside `Isolate` where the isolate data slots are stored. This
// should be the same as the value of `kIsolateEmbedderDataOffset` which is // should be the same as the value of `kIsolateEmbedderDataOffset` which is
// defined in `v8-internal.h`. // defined in `v8-internal.h`.
const EMBEDDER_DATA_OFFSET: usize = size_of::<[*const (); 23]>(); const EMBEDDER_DATA_OFFSET: usize = size_of::<[*const (); 61]>();
// Isolate data slots used internally by rusty_v8. // Isolate data slots used internally by rusty_v8.
const ANNEX_SLOT: u32 = 0; const ANNEX_SLOT: u32 = 0;

View File

@ -72,6 +72,8 @@ pub struct Source {
_host_defined_options: usize, _host_defined_options: usize,
_cached_data: usize, _cached_data: usize,
_consume_cache_task: usize, _consume_cache_task: usize,
_compile_hint_callback: usize,
_compile_hint_callback_data: usize,
} }
/// Compilation data that the embedder can cache and pass back to speed up future /// Compilation data that the embedder can cache and pass back to speed up future