0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-27 01:29:19 -05:00
Commit graph

582 commits

Author SHA1 Message Date
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
Bert Belder
b1a4dfea8b
Remove 'context' param from (almost) all public methods (#406) 2020-06-26 03:00:06 +02:00
Bert Belder
de2cca4c7f
Integrate 'TryCatch' in the scope system (#406) 2020-06-26 01:50:32 +02:00
Bert Belder
3b6ed67f5e
Rewrite the scope system from scratch (#406) 2020-06-26 01:42:00 +02:00
Bert Belder
8a4dc30445
Rename to_local() to cast_local(), use a closure (#406)
This makes it possible to add a run-time check that verifies that the
specified closure is actually the one that contains the local handle.
2020-06-19 20:18:07 +02:00
Bert Belder
dfd5069ef6
Upgrade crates (#408) 2020-06-19 20:13:37 +02:00
Bert Belder
dba9cb5ec3
ci: upgrade to Rust 1.44.1 (#408) 2020-06-19 20:12:24 +02:00
Bert Belder
6db41791ca
Remove unused 'v8::Locker' constructor/destructor bindings (#407) 2020-06-17 06:15:09 +02:00
Bert Belder
106a8085e2
Remove an unnecessary try_into() call (#407) 2020-06-17 06:15:08 +02:00
Bert Belder
54f6bfe8c1
Reflow comments and strings that exceed the 80-char column limit (#407) 2020-06-17 06:15:08 +02:00
Bert Belder
acdcede4d6
ci: upgrade to Rust 1.44.0 (#402) 2020-06-05 04:36:50 +02:00
Bert Belder
72042f2401
ci: use upstream actions/cache@v2 (#402)
Upstream finally tagged v2.0.0 so there's no reason to use our own fork
any longer.
2020-06-05 04:36:39 +02:00
Bert Belder
35e7e73ff4
Add (failing) test: escaping twice from EscapableHandleScope should panic (#401) 2020-06-05 03:57:31 +02:00
Ryan Dahl
5bb08e89b1 v0.5.1 2020-06-04 10:29:48 -04:00