Upgrade V8 to 9.4.146.2 (#753)

This commit is contained in:
Ben Noordhuis 2021-08-15 15:13:08 +02:00 committed by GitHub
parent 580a89cf10
commit 5a27cb7655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 69 deletions

View File

@ -1,6 +1,6 @@
# Rusty V8 Binding
V8 Version: 9.3.345.11
V8 Version: 9.4.146.2
[![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/rusty_v8.svg)](https://crates.io/crates/rusty_v8)

View File

@ -2298,23 +2298,10 @@ const v8::Value* v8__Module__GetException(const v8::Module& self) {
return local_to_ptr(self.GetException());
}
int v8__Module__GetModuleRequestsLength(const v8::Module& self) {
return self.GetModuleRequestsLength();
}
const v8::String* v8__Module__GetModuleRequest(const v8::Module& self, int i) {
return local_to_ptr(self.GetModuleRequest(i));
}
const v8::FixedArray* v8__Module__GetModuleRequests(const v8::Module& self) {
return local_to_ptr(self.GetModuleRequests());
}
void v8__Module__GetModuleRequestLocation(const v8::Module& self, int i,
v8::Location* out) {
*out = self.GetModuleRequestLocation(i);
}
void v8__Module__SourceOffsetToLocation(const v8::Module& self, int offset,
v8::Location* out) {
*out = self.SourceOffsetToLocation(offset);

View File

@ -1,4 +1,3 @@
use std::convert::TryInto;
use std::hash::Hash;
use std::hash::Hasher;
use std::mem::MaybeUninit;
@ -137,15 +136,7 @@ where
extern "C" {
fn v8__Module__GetStatus(this: *const Module) -> ModuleStatus;
fn v8__Module__GetException(this: *const Module) -> *const Value;
fn v8__Module__GetModuleRequestsLength(this: *const Module) -> int;
fn v8__Module__GetModuleRequest(this: *const Module, i: int)
-> *const String;
fn v8__Module__GetModuleRequests(this: *const Module) -> *const FixedArray;
fn v8__Module__GetModuleRequestLocation(
this: *const Module,
i: int,
out: *mut MaybeUninit<Location>,
) -> Location;
fn v8__Module__SourceOffsetToLocation(
this: *const Module,
offset: int,
@ -236,56 +227,11 @@ impl Module {
unsafe { Local::from_raw(v8__Module__GetException(self)) }.unwrap()
}
/// Returns the number of modules requested by this module.
#[deprecated(
since = "0.18.2",
note = "Use Module::get_module_requests() and FixedArray::length()."
)]
pub fn get_module_requests_length(&self) -> usize {
unsafe { v8__Module__GetModuleRequestsLength(self) }
.try_into()
.unwrap()
}
/// Returns the ith module specifier in this module.
/// i must be < self.get_module_requests_length() and >= 0.
#[deprecated(
since = "0.18.2",
note = "Use Module::get_module_requests() and ModuleRequest::get_specifier()."
)]
pub fn get_module_request(&self, i: usize) -> Local<String> {
// Note: the returned value is not actually stored in a HandleScope,
// therefore we don't need a scope object here.
unsafe {
Local::from_raw(v8__Module__GetModuleRequest(self, i.try_into().unwrap()))
}
.unwrap()
}
/// Returns the ModuleRequests for this module.
pub fn get_module_requests(&self) -> Local<FixedArray> {
unsafe { Local::from_raw(v8__Module__GetModuleRequests(self)) }.unwrap()
}
/// Returns the source location (line number and column number) of the ith
/// module specifier's first occurrence in this module.
#[deprecated(
since = "0.18.2",
note = "Use Module::get_module_requests(), ModuleRequest::get_source_offset() and
Module::source_offset_to_location()."
)]
pub fn get_module_request_location(&self, i: usize) -> Location {
let mut out = MaybeUninit::<Location>::uninit();
unsafe {
v8__Module__GetModuleRequestLocation(
self,
i.try_into().unwrap(),
&mut out,
);
out.assume_init()
}
}
/// For the given source text offset in this module, returns the corresponding
/// Location with line and column numbers.
pub fn source_offset_to_location(&self, offset: int) -> Location {

2
v8

@ -1 +1 @@
Subproject commit 6556d168cee1a542bed3267572862e26e0692626
Subproject commit cd7c1dc128dd6f2b49340606cca2cab163d5849a