0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-26 16:09:37 -05:00
Commit graph

445 commits

Author SHA1 Message Date
Max Drosdo.www
5b0de38fe4
simplify ci config (#458) 2020-09-06 14:04:25 -04:00
devsnek
cf59bf1e4d
Add support for ccache (#455) 2020-09-03 19:22:07 +02:00
Bert Belder
21f6ecf483
Fix flaky tests caused by relaxed load in C++ 'shared_ptr::use_count()' (#450)
Fixes: #284
2020-09-02 17:38:39 +02:00
Bert Belder
d91970dcf6
Fix minor SharedPtr/SharedRef issues, and add unit tests (#450)
* The `Default` trait did not actually get derived for `SharedPtr<T>`.
  This is solved by implementing `Default` manually.
* Trait function `Shared::get()` used to return a mutable raw pointer
  (`*mut Self`), but it would be inconceivable to ever mutate the
  referenced value. It was changed to return a const pointer instead.
* Added some basic unit tests for types `SharedPtr` and `SharedRef`.
2020-09-02 17:25:21 +02:00
Ben Noordhuis
b88f9f5bbc
Add Date::new() and Date::value_of() (#452) 2020-09-01 22:28:08 -04:00
Bert Belder
1009103419
v0.9.1 (#447) 2020-08-28 17:52:05 +02:00
Bert Belder
e88ea4ad01
Downgrade to V8 8.6.334 again (#447)
After the upgrade some Deno tests started crashing somewhere deep inside
V8, and the cause of these crashes is unclear.

This reverts the following commits:
* 12334ffe Upgrade gn to 6f13aaac; make BUILD.gn compatible with it (#443)
* f53f10d4 Upgrade V8 to 8.7.25 (#443)
2020-08-28 17:52:05 +02:00
Bert Belder
7b62f73ab3
Extend tools/upgrade_v8.sh (#447) 2020-08-28 17:24:44 +02:00
picoHz
fa8f636397
Specify custom URL for binary downloads with 'RUSTY_V8_MIRROR' env var (#446) 2020-08-28 12:03:34 +02:00
Bert Belder
1ccabcc650
v0.9.0 (#444) 2020-08-28 00:30:59 +02:00
Ryan Dahl
f53f10d41f
Upgrade V8 to 8.7.25 (#443) 2020-08-27 23:38:54 +02:00
Bert Belder
12334ffef1
Upgrade gn to 6f13aaac; make BUILD.gn compatible with it (#443) 2020-08-27 23:38:54 +02:00
Bert Belder
492d6b3440
Upgrade Rust crates (#443) 2020-08-27 23:38:54 +02:00
Bert Belder
c1804c2e50
ci: always save Github Actions cache after V8 upgrade (#443) 2020-08-27 23:38:54 +02:00
Bert Belder
ac9bb44e33
ci: don't store $CARGO_HOME in Github Actions cache (#443)
There currently is a problem related to Github Actions in general or the
'actions-rs/cargo' action in particular, which causes cargo to be unable
to find the 'serde_derive' crate when the cargo home dir has been
restored from cache.

This issue is also being reported by others, e.g. at
https://github.com/actions-rs/cargo/issues/111.
2020-08-27 23:38:54 +02:00
Bert Belder
fdc03238c4
ci: upgrade to Rust 1.46.0 (#443) 2020-08-27 23:38:53 +02:00
Bert Belder
a4eb164639
ci: upgrade Linux environment to Ubuntu 18.04 (#443) 2020-08-27 22:37:02 +02:00
Bert Belder
d90742277d
Format source code and fix clippy warning (#443) 2020-08-27 20:46:25 +02:00
devsnek
6d5686cd7c
Add synthetic module support (#441) 2020-08-25 17:39:18 -04:00
Ben Noordhuis
6b2c7a56a7
Add Isolate::[gs]et_microtasks_policy() (#439)
Isolate::run_microtasks() already exists but the microtasks queue
is also flushed on script entry and exit. Some embedders want strict
control over when microtasks run, which is set by the policy.

And deprecate Isolate::run_microtasks(). The corresponding V8 API is
tagged with V8_DEPRECATE_SOON.
2020-08-23 10:25:16 -04:00
Ben Noordhuis
fd5458c959
Add Isolate::get_heap_statistics() (#440) 2020-08-23 10:16:45 -04:00
Bert Belder
d6528c7300
v0.8.1 (#434) 2020-08-08 17:46:29 +02:00
Ryan Dahl
6d35b6cd8d
Downgrade V8 to 8.6.334 (#434) 2020-08-08 17:46:17 +02:00
Bert Belder
53d0c65747
v0.8.0 2020-08-07 19:01:52 +02:00
Bert Belder
d84be8ca2a
SnapshotCreator::GetIsolate() should have been a const method (#432) 2020-08-07 18:35:51 +02:00
Bert Belder
954163ab07
Fix the 'heap_limits' test (#430)
After upgrading to V8 8.6.337, with a 20 MB heap limit, the
near-heap-limit callback never gets called before V8 runs out of memory.

It turns out that this test exhibits memory allocation behavior which
produces so little actual garbage that 'scavenge' type garbage
collections make memory usage go up rather than down. Because of this,
V8 runs out of memory in the middle of a garbage collection cycle, after
it has already decided that there's no need to run the near-heap-limit
callback.

The issue is fixed by making sure that some actual garbage is produced
alongside with the retained objects that will eventually fill up the
heap.
2020-08-06 04:08:14 +02:00
Bert Belder
24fa76aaaa
Upgrade V8 to 8.6.337 (#430) 2020-08-06 03:48:17 +02:00
Bert Belder
5f493585fc
Upgrade Rust crates (#430) 2020-08-05 20:38:27 +02:00
Bert Belder
69c245fc79
ci: upgrade to Rust 1.45.2 (#430) 2020-08-05 20:38:27 +02:00
Marcus Weiner
b0dc42f900
Add support for setting V8 heap limits and using a near-heap-limit callback (#427) 2020-07-30 18:40:18 +02:00
Bert Belder
31036d8130
Upgrade crates (#428) 2020-07-28 15:12:30 +02:00
Bert Belder
da0c5f76e4
Add 'CallbackScope<()>' that doesn't assume an entered Context (#425)
Certain callbacks (e.g. `WasmLoadSourceMapCallback`) expect the
embedder to return a local handle (a `Local<String>` in this case), but
do not provide a `Local<Context>` as an argument, nor does it provide
any other argument that we might obtain a context from. This is not
unexpected - WASM execution as such is not tied to a context, and a
`Local<String>` can be created without a context too because it's a
primitive value that has no JavaScript prototype.
2020-07-19 11:02:23 +02:00
Ryan Dahl
e2dd7a7f7d
v0.7.0 2020-07-18 10:55:29 -04:00
Bartek Iwańczuk
040fbce4fe
chore: update Rust to 1.45.0 (#424) 2020-07-18 10:55:15 -04:00
Ben Sheffield
e74b6bcd0d
Add 'Object::set_accessor_with_setter' (#422) 2020-07-17 11:17:29 -04:00
Bert Belder
9684640b48
Implement the 'Hash' trait for local and global handles (#415) 2020-07-08 10:27:34 +02:00
Bert Belder
2b11a57d47
Refactor 'v8__internal__GetIsolateFromHeapObject' (#415)
It turns out that using `v8::internal::MaybeObject` was, although
harmless, not appropriate here, because this function does not deal
deal with (potentially) weak handles.
2020-07-08 09:41:37 +02:00
Bert Belder
82d0287028
'External' handles can be created without entering a Context (#416) 2020-07-05 01:36:51 +02:00
Bert Belder
91c8c7d1c7
Implement 'Eq' for all subtypes of 'Value' and its handles (#414) 2020-07-04 07:11:56 +02:00
Bert Belder
d3f6e4d36c
Add 'Value::same_value_zero()' (#414) 2020-07-04 07:11:04 +02:00
Skyler Lipthay
1b84bc74f6
Add 'Value::boolean_value()' and 'Value::to_boolean()' (#412) 2020-07-03 14:42:19 +02:00
Skyler Lipthay
8ebfb027c0
Add 'Object::has(_index)' and 'Object::delete(_index)' (#412) 2020-07-03 14:41:40 +02:00
Bert Belder
b981aaceee
Add 'External::new()' and 'External::value()' (#413) 2020-07-03 14:01:42 +02:00
Bert Belder
acf6bfe0e4
Add the 'HandleScope::with_context()' scope constructor (#410) 2020-07-01 10:44:23 +02:00
Bert Belder
c13625148f
Refactor handle types 'Local' and 'Global' (#410)
* Merged all handle type implementations into one file ('handle.h').
* Made it so that `Global` handles cannot be empty.
* Renamed the `AsHandle` trait to `Handle`, and made it more generally
  useful.
* Simplified how `PartialEq` is implemented for V8 heap objects and/or
  the `Local`/`Global` handles that reference them.
2020-07-01 10:44:23 +02:00
Bert Belder
850af2e857
Remove 'FinalizationGroup' bindings (#410)
V8 no longer supports or even defines this type.
2020-07-01 10:44:23 +02:00
Bert Belder
17a40b3914
v0.6.0 2020-06-26 18:07:27 +02:00
Bert Belder
c1104f335e
Upgrade V8 to 8.5.216 (#409) 2020-06-26 17:32:44 +02:00
Bert Belder
8635fb2a60
Upgrade crates (#409) 2020-06-26 17:29:10 +02:00
Bert Belder
4e64cefc9c
Remove unnecessary 'DerefMut' impl from 'Local<T>' (#406)
Local handles never need to be mutable. This patch also rounds up the
last few places where we were still asking the user to pass an `&mut T`
to an API method.
2020-06-26 15:05:39 +02:00