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

22 commits

Author SHA1 Message Date
snek
adf56a4f0f
feat: changes for vm (#1557) 2024-08-05 11:15:56 +02:00
snek
d22c1f9a3c
feat: upgrade ScriptOrigin (#1550) 2024-07-25 22:32:11 +00:00
Nathan Whitaker
6385bd6f32
chore: Add a couple convenience casting functions to v8::Local (#1533)
* Rename cast -> cast_unchecked

* Add cast helpers

* Change a couple tests to use it

* Add some small docs

* Fmt

* Add inline hint

* Address comments
2024-07-20 01:34:32 +00:00
snek
57fb97a43b
feat: cppgc::Ptr (#1523) 2024-07-10 22:03:49 -07:00
snek
e747f405a4
fix: remove use of deprecated apis (#1488) 2024-06-27 08:29:46 -07:00
Divy Srivastava
70a07c050b
isolate->GetCppHeap() can return nullptr if no heap is attached (#1385)
Changes `v8::Isolate::get_cpp_heap` to return a `Option<&Heap>`.
2024-01-06 18:05:15 +00:00
Divy Srivastava
3de68239a5
Upgrade to V8 12.1.285.6 (#1374)
1. [[exceptions] Unify pending and scheduled exceptions](https://chromium-review.googlesource.com/c/v8/v8/+/5050065)

Reset no longer clears exception if it was rethrown. The test had to be adjusted for the same.

2. [[api] Allow passing CppHeap on Isolate creation](https://chromium-review.googlesource.com/c/v8/v8/+/4989254)

`AttachCppHeap` was deprecated but the alternative of passing `CppHeap` via Isolate CreateParams hard crashes (SIGSEGV). There are no tests for this in V8 and it seems the [Chromium CL](https://chromium-review.googlesource.com/c/chromium/src/+/4992764) is also crashing. For now I've just suppressed the deprecation warning until the crash is fixed in V8.

3. v8::Serializer impl must not throw more than one exception. 

I changed `get_shared_buffer_id()` to not throw and return `None`. V8 internally calls data clone error when it's the SAB is not clonable.

Other changes:

- `v8::ScriptCompiler` size increased by 3 words with `v8::ScriptCompiler::CompilationDetails`.
- `v8::ObjectTemplate::SetAccessor` & `v8::ObjectTemplate::SetAccessorProperty` signature changed and also deprecated.
- `v8::Context::SetContinuationPreservedEmbedderData` deprecated. Use `v8::Isolate::GetContinuationPreservedEmbedderData` instead.
- `GetStalledTopLevelAwaitMessage` deprecated. Use `GetStalledTopLevelAwaitMessages` instead.
- `v8::Isolate::AttachCppHeap` deprecated. Set the heap on Isolate creation using CreateParams instead. 
- `v8::ScriptOrigin` deprecated. Use constructor without the isolate.
- `v8::SnapshotCreator` is deprecated. Use the version that passes CreateParams instead.
- `v8::Isolate` assertion failures.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-05 18:50:42 +05:30
Matt Mastracci
811cce27c0
chore: disable android example deps on non-android platforms (#1375) 2023-12-08 16:34:43 -07:00
Divy Srivastava
7072da4199
Add cppgc bindings (#1336)
https://v8.dev/blog/high-performance-cpp-gc

Oilpan in Deno design doc: https://www.notion.so/denolandinc/Oilpan-cppgc-in-Deno-e194f4268e9f4135ba97610ff7d3a949?pvs=4

Oilpan can be used to implement GC'able resources in Deno

Closes https://github.com/denoland/rusty_v8/issues/933
2023-10-30 20:40:15 +05:30
Bartek Iwańczuk
4dd8b60bf0
chore: update to Rust 1.70.0 (#1277) 2023-07-11 12:50:03 -06:00
Bartek Iwańczuk
65ff64e5cd
chore: update Rust to 1.65.0 (#1116) 2022-11-25 14:32:52 +01:00
Darshan Sen
dbf19c8545
Improve Object::get_property_names() and Object::get_own_property_names() (#1049)
This change allows the customization of the behavior of
v8::Object::GetOwnPropertyNames() and v8::Object::GetPropertyNames() by
accepting all the options that the raw V8 API supports.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-09-03 18:11:40 +02:00
github-actions[bot]
b91d363d2f
Rolling to V8 10.0.139.6 (#915)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-03-09 14:41:46 +01:00
Luca Casonato
8b90dfd2f4
v0.39.0 2022-02-02 12:44:32 +01:00
Divy Srivastava
d171fbb890
fix: separate out android example into crate (#871) 2022-01-19 16:09:07 +05:30
Divy Srivastava
a29740df6b
Add aarch64-linux-android support (#860) 2022-01-04 21:32:48 +01:00
Luca Casonato
5ee0a375f2
chore: rename rusty_v8 to v8 (#803) 2021-10-27 14:32:12 +02:00
Tim Ramlot
14bcf04bef
Add support for Platform::pump_message_loop and Platform::run_idle_tasks (#706)
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
2021-07-01 16:05:07 +02:00
Ben Noordhuis
0d093a02f6
Upgrade V8 to 8.9.255.3 (#567)
This floats https://chromium-review.googlesource.com/c/v8/v8/+/2608209
because it just missed the merge window for 8.9.
2021-01-18 21:46:44 +01:00
Daniel Bevenius
d78dcd087f
Fix typo in examples/process.rs comment (#580) 2021-01-11 19:38:39 -08:00
Daniel Bevenius
b1d31c7d76
Add dispose/shutdown_platform to hello_world (#532)
This commit adds calls to v8::V8::dispose and v8::V8::shutdown_platform
to the hello_world.rs example.

The motivation for adding this is that it was not obvious to me that I
needed to have the Isolate in a separate scope. If there is not, the
platform will have been shutdown before the Isolate's Drop function
is called at the end of the function where the scope ends. Drop will in
turn call Dispose on the V8 Isolate, which calls Isolate::Deinit, and
Deinit calls tracing_cpu_profilers.reset() which will call
~TracingCpuProfilerImpl which has a call to V8::GetCurrentPlatform()
which will produce the following error:

 Fatal error in ../../../v8/src/init/v8.cc, line 144
 Debug check failed: platform.

 FailureMessage Object: 0x7fff45b03700Illegal instruction (core dumped)

Having an example might safe others some time if they run into the same
issue.
2020-11-19 12:26:45 +01:00
Hikaru Terazono
35dbd2c0ff
Add examples (#475) 2020-10-16 11:15:16 -04:00