0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-26 09:13:46 -05:00
Commit graph

905 commits

Author SHA1 Message Date
hilldani
d4931dc891
resolve CVE-2022-37434 (#1136)
current zlib 1.2.12 is vulnerable to CVE-2022-37434 as documented on zlib website with details at https://nvd.nist.gov/vuln/detail/CVE-2022-37434. This resolves vulnerability by going to zlib 1.2.13
2022-11-28 21:07:03 +01:00
Jonathan Birk
9a0a6bc570
Meaningful error message if gn can't be run (#1115) 2022-11-27 03:03:24 +01:00
Mike Mulchrone
3c6d259507
Exposing Value::TypeOf (#1133) 2022-11-27 03:02:08 +01:00
Bartek Iwańczuk
04a5fa6737
v0.56.1 2022-11-26 17:39:44 +01:00
Bartek Iwańczuk
06f385afb6
Add 'aux_data' to v8::Inspector::contextCreated() (#1134) 2022-11-26 16:11:35 +01:00
Bartek Iwańczuk
7c0b53fe07
v0.56.0 2022-11-25 16:50:42 +01:00
Bartek Iwańczuk
65ff64e5cd
chore: update Rust to 1.65.0 (#1116) 2022-11-25 14:32:52 +01:00
denobot
f827193799
Rolling to V8 10.9.194.4 (#1122) 2022-11-25 00:23:22 +01:00
Nils Hasenbanck
e89d532b57
Remove libc dependency. (#1117)
Use `std` functionality where possible. Only size_t needs
to be defined like was done with the `intptr_t` type before.

Also unifies the usage of `std::os::raw` types that where
already defined in the support module.
2022-11-24 20:23:52 +05:30
Andreu Botella
d718370a07
refactor: Have ArrayBuffer::data return Option<NonNull<c_void>> (#1131)
The pointer returned by `ArrayBuffer::data` might be null if the
backing store has zero length, but the return type `*mut c_void` does
not force the user to consider this case. This change makes the return
type `Option<NonNull<c_void>>`, which is semantically equivalent, but
which forces users of the API to handle the `None` case.

This PR is the `ArrayBuffer` counterpart to #817.

This is a breaking API change.
2022-11-24 15:31:11 +01:00
Divy Srivastava
3a05ab4cd6
Add WasmMemoryObject::buffer method (#1128) 2022-11-23 21:44:37 +05:30
Bartek Iwańczuk
dd5fa705d4
Add v8::V8Inspector::context_destroyed API (#1125) 2022-11-22 23:50:49 +01:00
Andreu Botella
d992c5056b
Update ArrayBuffer::was_detached to not use OpenHandle (#1126)
In #1103, the `ArrayBuffer::was_detached` method was added to rusty_v8
to fill a gap in the C++ API, and it was implemented using the
internal `v8::Utils::OpenHandle`. Since then, a `WasDetached` method
was added to `ArrayBuffer` in V8 10.9. This PR updates the
implementation to use that.
2022-11-21 12:47:12 +01:00
Andreu Botella
acba887fa4
Add ArrayBuffer::set_detach_key (#1127)
This method, introduced in V8 10.9, makes it so an `ArrayBuffer`
object is impossible to detach unless a specific detach key is passed
to the `detach` method. Such `ArrayBuffer`s still count as detachable
as per the `ArrayBuffer::is_detachable` method, but otherwise behave
much like WebAssembly memories.
2022-11-21 12:46:57 +01:00
Mark Gutenberger
601fed8d2a
(docs): add note about curl [#1111] (#1114) 2022-11-20 22:02:47 +01:00
Bartek Iwańczuk
3d30e7cc82
feat: v8::Module::get_stalled_top_level_await_message (#1123)
This commit adds "v8::Module::get_stalled_top_level_await_message" API
that allows to retrieve a vector of tuples with handles to v8::Module and v8::Message.
This information can be used to display a nice error when event loop runs out
of work to do but there are still unresolved promises.
2022-11-17 19:35:15 +01:00
Bartek Iwańczuk
cc7183d09f
v0.55.0 2022-11-12 03:14:26 +01:00
Bartek Iwańczuk
9d15050214
fix: Rework deprecated v8::ArrayBuffer:detach API (#1121) 2022-11-12 01:51:21 +01:00
denobot
84880f49eb
Rolling to V8 10.9.194.1 (#1118) 2022-11-11 20:33:40 +01:00
Bartek Iwańczuk
5265b6b021
Track v8 10.9 (#1119) 2022-11-11 00:31:07 +01:00
denobot
dd91b4d299
Rolling to V8 10.8.168.14 (#1112) 2022-11-09 13:45:17 -08:00
Bartek Iwańczuk
b8d7925774
docs: add note how to create a v8::Local out of v8::Global (#1113) 2022-11-02 22:09:07 +01:00
denobot
7091248630
Rolling to V8 10.8.168.5 (#1110) 2022-10-22 23:57:09 +02:00
Bartek Iwańczuk
0b299420bd
v0.54.0 2022-10-20 16:49:39 +02:00
Bert Belder
d85f78527f
perf: optimize FunctionCallbackInfo and PropertyCallbackInfo methods (#1104) 2022-10-19 21:41:22 +02:00
denobot
c89ae9453b
Rolling to V8 10.8.168.4 (#1106)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-18 23:47:07 +02:00
Bartek Iwańczuk
2ead748b90
Track v8 10.8 (#1105) 2022-10-18 21:58:19 +02:00
Divy Srivastava
8a3a049d9f
Access to raw v8::Context slots (#1092)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-18 14:01:54 +02:00
Marcos Casagrande
c06986c12e
feat: add ArrayBuffer::was_detached() (#1103) 2022-10-16 22:03:48 +02:00
Bartek Iwańczuk
09cac0aa04
v0.53.1 2022-10-15 23:34:03 +02:00
Bartek Iwańczuk
825b1e562b
Revert "Remove zlib dependency (#1058)" (#1101)
This reverts commit 169d5d6ea0.
2022-10-15 15:18:01 -04:00
denobot
13a5aec8c7
Rolling to V8 10.7.193.16 (#1100) 2022-10-15 11:30:04 +00:00
Bartek Iwańczuk
b84bb10814
v0.53.0 2022-10-14 13:59:34 +00:00
denobot
7bc8445e81
Rolling to V8 10.7.193.15 (#1095) 2022-10-14 12:31:56 +00:00
Leo Kettmeir
885e0163a1
feat: add v8::Isolate::snapshot_creator_from_existing_snapshot API (#973)
This commit adds "v8::Isolate::snapshot_creator_from_existing_snapshot" API,
that allows to create a new snapshot from already existing snapshot.

Following APIs were added as well:

"v8::Context::from_snapshot"
"v8::Isolate::add_context"

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-10-14 12:33:09 +02:00
Bartek Iwańczuk
4b704ed8a9
refactor: v8::Isolate::snapshot_creator instead of v8::SnapshotCreator (#1098)
This commit removes "v8::SnapshotCreator" in favor of
"v8::Isolate::snapshot_creator" API. All methods from
"v8::SnapshotCreator" are now available on the "v8::Isolate".
If a method is called and isolate was not set up as a snapshot
creator then it will panic.

This commit gets rid of long standing unsoundness in typing
that allowed to easily induce a panic or segfault if a user didn't
use snapshot creator API properly.
2022-10-14 10:46:54 +02:00
Ben Noordhuis
213305b3de
Strengthen fast call API test (#1093)
Check that it actually performs the expected operation (adding two
numbers) because it didn't - the callback's function prototype was
wrong. V8 always passes the receiver object as the first parameter.
2022-10-09 15:26:06 +02:00
Bert Belder
b2a09e2f14
perf: optimize scope construction and Isolate::get_slot/set_slot() (#1090) 2022-10-08 18:08:37 +05:30
Bert Belder
fc26f634e4
Don't use embedder slot in HostImportModuleDynamicallyCallback ABI adapter (#1089) 2022-10-08 00:30:01 +00:00
PerfectLaugh
403d6c525d
Enable running on 32 bits and several minor fixes (#976) 2022-10-07 15:02:51 +02:00
Bartek Iwańczuk
5635a82d40
v0.52.0 2022-10-07 00:25:02 +02:00
Divy Srivastava
5dd41e9dba
use Isolate for creating primitives (#1082) 2022-10-06 20:44:16 +02:00
Nugine
8f8636b4f7
feat: add String::write_utf8_uninit (#1019) 2022-10-06 19:26:38 +02:00
Aaron O'Mullan
de7a1acbde
feat(isolate): expose get/set_data (#911)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-06 19:19:38 +02:00
Andreu Botella
cfdb8b0ccd
feat: Guaranteed finalizers (#1076)
Currently, when a finalizer callback is registered, it is not
guaranteed to be called if there is a global reference to the
corresponding object that survives the isolate. This is because the
finalizer callback takes a `&mut Isolate`, and so it must be called
before the isolate is fully destroyed, but all existing globals
(including possibly the one being currently finalized) are still
usable while there still exists a mutable reference to the isolate.

However, there are still use cases for having finalizers that are
guaranteed to run regardless of any remaining globals, but that don't
require any interaction with the isolate. This change adds them.

This change also changes the context annex to use a guaranteed
finalizer, fixing a bug with context slots not being freed if there
were any globals to the context at the time the isolate is dropped.
2022-10-06 17:25:45 +02:00
Giovanny Gutiérrez
cd51ea1bf2
feat: Add ObjectTemplate NamedProperty and IndexedProperty handlers (#1064) 2022-10-06 00:23:01 +02:00
Luca Matei Pintilie
760c48a089
feat: Add v8::icu::get_language_tag() (#953)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-10-05 23:19:42 +02:00
Divy Srivastava
40cb4f8ec9
Skip running benchmarks in CI (#1085) 2022-10-05 16:23:27 +00:00
denobot
128be61039
Rolling to V8 10.7.193.13 (#1081) 2022-09-30 15:45:33 +00:00
Ryan Dahl
4e08bd7917
v0.51.0 2022-09-21 03:29:34 +00:00