Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync with upstream #1

Merged
merged 70 commits into from
Oct 16, 2023
Merged

sync with upstream #1

merged 70 commits into from
Oct 16, 2023

Conversation

redbonzai
Copy link
Owner

No description provided.

aapoalas and others added 30 commits June 2, 2023 11:28
* feat(fastcall): Int64Representation

* Add tests, new_with_bigint API

* Fix build, actually
By default, copying a file will preserve its mode and ownership
attributes.
This is an issue when copying the V8 archive from a read-only
filesystem since the archive file also becomes read-only, so
subsequent builds will fail.

We now create a new destination file and copy the content of the archive
to it, this ensures the destination file has the default attributes.
Some fixes around one-byte strings:

 - `is_onebyte` was calling the wrong v8 API.
 - We didn't have a way to write one-byte strings with uninitialized buffers
 - (bonus) The test_string method was quite slow making testing a bit of a pain
Co-authored-by: Bartek Iwańczuk <[email protected]>
chore: Add copy, clone and debug to some types
this warning only occurs when using the library as a dependency.

warning: unused return value of `Box::<T>::from_raw` that must be used
    --> /rusty_v8/src/scope.rs:1092:16
     |
1092 |       unsafe { Box::from_raw(root) };
     |                ^^^^^^^^^^^^^^^^^^^
     |
   = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
   = note: `#[warn(unused_must_use)]` on by default
#1275)

MSVC and Itanium C++ ABIs agree that for simple inheritance the basic structure of a vtable contains metadata fields at a "negative offset" from the vtable pointer, and at zero or positive offsets come the virtual function pointers in the order of declaration. The only difference between the two is that MSVC only places the virtual deleting destructor in the vtable while Itanium ABI places both the deleting and the complete object destructors in it, leading to a vtable that is one pointer larger in Itanium / on Linux. Also MSVC only has a single metadata field instead of two for Itanium. Itanium inlines the base offset into the vtable while MSVC keeps it in what is essentially the entry point into the type info data.

Since the two are so similar, creating a custom vtable on Rust-side is pretty easy and can be done entirely at compile-time, meaning that instances of the class can also be created entirely at compile time. This leads to fully const external strings being possible.
Fix missing ASCII assertion, assert length
This commit adds two new types of scopes:
- DisallowJavascriptExecutionScope
- AllowJavascriptExecutionScope

The first one can be used to prevent execution of JavaScript 
(with customizable behavior on an attempt of executing JS, eg.
crashing the process); while the second one can be constructed
from the first to temporarily enable executing JS.

These are useful for "value serializers" to prevent user defined objects
from causing unintended behavior.

---------

Co-authored-by: Bartek Iwańczuk <[email protected]>
denobot and others added 29 commits August 23, 2023 12:14
The memory leak caused by the EPT table not being subject to garbage
collection is apparently still there.
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.9.1 to 3.13.0.
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](fitzgen/bumpalo@3.9.1...3.13.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…pi` (#1324)

`for_global` was documented as `for_key` but implemented as `for_api`.

Closes #1323
@redbonzai redbonzai merged commit 1e00997 into redbonzai:main Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.