0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-21 15:04:33 -05:00

Rolling to V8 9.9.115.5 (#887)

Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
github-actions[bot] 2022-02-02 00:51:14 +01:00 committed by GitHub
parent 11f633927b
commit b12987ac81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 12 deletions

View file

@ -1,6 +1,6 @@
# Rusty V8 Binding
V8 Version: 9.8.177.9
V8 Version: 9.9.115.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

@ -1126,8 +1126,8 @@ int v8__Object__GetIdentityHash(const v8::Object& self) {
return ptr_to_local(&self)->GetIdentityHash();
}
const v8::Context* v8__Object__CreationContext(const v8::Object& self) {
return local_to_ptr(ptr_to_local(&self)->CreationContext());
const v8::Context* v8__Object__GetCreationContext(const v8::Object& self) {
return maybe_local_to_ptr(ptr_to_local(&self)->GetCreationContext());
}
const v8::Array* v8__Object__GetOwnPropertyNames(const v8::Object* self,

View file

@ -80,7 +80,7 @@ extern "C" {
attr: PropertyAttribute,
) -> MaybeBool;
fn v8__Object__GetIdentityHash(this: *const Object) -> int;
fn v8__Object__CreationContext(this: *const Object) -> *const Context;
fn v8__Object__GetCreationContext(this: *const Object) -> *const Context;
fn v8__Object__GetOwnPropertyNames(
this: *const Object,
context: *const Context,
@ -382,11 +382,11 @@ impl Object {
}
/// Returns the context in which the object was created.
pub fn creation_context<'s>(
pub fn get_creation_context<'s>(
&self,
scope: &mut HandleScope<'s>,
) -> Local<'s, Context> {
unsafe { scope.cast_local(|_| v8__Object__CreationContext(self)) }.unwrap()
) -> Option<Local<'s, Context>> {
unsafe { scope.cast_local(|_| v8__Object__GetCreationContext(self)) }
}
/// This function has the same functionality as GetPropertyNames but the

View file

@ -1540,7 +1540,7 @@ fn object() {
&[v1, v2],
);
assert!(!object.is_null_or_undefined());
let lhs = object.creation_context(scope).global(scope);
let lhs = object.get_creation_context(scope).unwrap().global(scope);
let rhs = context.global(scope);
assert!(lhs.strict_equals(rhs.into()));
@ -1653,7 +1653,7 @@ fn array() {
let s2 = v8::String::new(scope, "b").unwrap();
let array = v8::Array::new(scope, 2);
assert_eq!(array.length(), 2);
let lhs = array.creation_context(scope).global(scope);
let lhs = array.get_creation_context(scope).unwrap().global(scope);
let rhs = context.global(scope);
assert!(lhs.strict_equals(rhs.into()));
array.set_index(scope, 0, s1.into());
@ -2024,7 +2024,7 @@ fn function() {
let function = fn_template
.get_function(scope)
.expect("Unable to create function");
let lhs = function.creation_context(scope).global(scope);
let lhs = function.get_creation_context(scope).unwrap().global(scope);
let rhs = context.global(scope);
assert!(lhs.strict_equals(rhs.into()));
let value = function
@ -2219,7 +2219,7 @@ fn promise_hook() {
#[allow(clippy::clone_on_copy)]
if type_.clone() == v8::PromiseHookType::Init {}
let scope = &mut unsafe { v8::CallbackScope::new(promise) };
let context = promise.creation_context(scope);
let context = promise.get_creation_context(scope).unwrap();
let scope = &mut v8::ContextScope::new(scope, context);
let global = context.global(scope);
let name = v8::String::new(scope, "hook").unwrap();

2
v8

@ -1 +1 @@
Subproject commit d89d294754e47fc32385e8930c1dcfb82cd2345a
Subproject commit 3f7acaf72adeb21dfac5a92601dd510e3f43ec42