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

892 commits

Author SHA1 Message Date
Daniel Bevenius
eb0222ce08
docs: Fix typo in scope module comment (#538) 2020-11-19 19:20:31 +01:00
Bartek Iwańczuk
718c2fe1a7
chore: upgrade Rust crates (#537) 2020-11-19 18:38:58 +01: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
Ben Noordhuis
64faf683d2
Add Value::to_rust_string_lossy() (#530)
If it's convenient to have on String objects, then it's convenient to
have on all Value instances.
2020-11-19 11:58:23 +01:00
Ben Noordhuis
b9f48ebd26
Upgrade V8 to 8.8.278.2 (#533) 2020-11-19 10:02:02 +01:00
Moritz Gunz
efe0e76a75
#[derive(Debug)] all the things (#468)
This commit implements Debug trait for most public structs.
2020-11-18 15:17:25 +01:00
Bartek Iwańczuk
2a9e2e6409
build: upgrade ci script (#531)
Replace deprecated add-path and set-env with echoing 
to $GITHUB_PATH and $GITHUB_ENV respectively.
2020-11-17 19:57:52 +01:00
Ben Noordhuis
bca41e4cb0
Upgrade V8 to 8.7.220.24 (#527) 2020-11-17 00:36:55 +01:00
Ben Noordhuis
0915d14efd
Revert "Fix rustdoc warnings (#526)" (#528)
This reverts commit 58ca728c5f.

The commit passed CI but it's causing `cargo test` to fail locally for
me. This is with rustc 1.47.0.
2020-11-17 00:23:32 +01:00
Daniel Bevenius
58ca728c5f
Fix rustdoc warnings (#526)
This commit attempts to fix the reported warnings that are generated by
rustdoc.
2020-11-15 17:57:06 +01:00
Ben Noordhuis
3fa9fb36ed
Fix runtime assert when hashing module object (#522)
The blanket `std:#️⃣:Hash` impl for instances of `v8::Data` invokes
`v8::internal::Object::GetHash()` but that crashes for `v8::Module`
objects. Use a custom impl that calls `v8::Module::get_identity_hash()`.

Fixes the following runtime assertion:

    # Fatal error in ../../../v8/src/objects/objects-inl.h, line 1043
    # Debug check failed: object.IsJSReceiver().

Refs: https://github.com/denoland/deno/pull/8354#discussion_r522157813
2020-11-15 00:07:52 +01:00
Daniel Bevenius
0e54213cc8
Remove mut from Example in lib.rs (#523)
This commit removes mut from the script variable to avoid the following
warning if used:

25 |   let mut script = v8::Script::compile(scope, code, None).unwrap();
   |       ----^^^^^^
   |       |
   |       help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

warning: 1 warning emitted
2020-11-13 21:55:52 +01:00
Daniel Bevenius
0f772d7a31
Fix typo in ReturnValue struct comment (#521) 2020-11-13 14:41:15 +01:00
liushuyu
f2f5d86af8
feat(build): allow native compilation on non-amd64 (#514) 2020-10-31 13:32:33 +01:00
Ben Noordhuis
315e9a83e0
Simplify Function::new_with_data() (#510)
It's not necessary to have a separate C++ glue function, it can be
shared with Function::new().
2020-10-27 15:15:00 +01:00
l3ops
fb049cb934
Add Function::new_instance (#508) 2020-10-26 08:57:14 +01:00
Ben Noordhuis
b8a2e06dc8
Add Isolate::clear_kept_objects() (#507)
Refs: https://github.com/denoland/deno/issues/7674
2020-10-21 08:00:44 +02:00
Ryan Dahl
b42dca49ef
v0.12.0 2020-10-16 12:18:31 -04:00
Hikaru Terazono
35dbd2c0ff
Add examples (#475) 2020-10-16 11:15:16 -04:00
Ben Noordhuis
1988c98f3c
Add Isolate::set_allow_atomics_wait() (#500) 2020-10-15 22:12:44 +02:00
Ben Noordhuis
1c38b66093
Add Object::get_private() and friends (#498) 2020-10-15 14:37:29 +02:00
Ben Noordhuis
836557e84f
Add Module::script_id() (#497) 2020-10-15 11:05:38 +02:00
Ben Noordhuis
57390ec4ee
Add Isolate::set_promise_hook() (#496) 2020-10-12 22:33:46 +02:00
Ben Noordhuis
ea0c7c9383
Fix PromiseRejectMessage::get_value() (#493)
Change its return type to `Option<Local<Value>>`. The C++ API
returns `Local<Value>` but that can be an empty handle.

Fixes #491
2020-10-09 12:58:57 +02:00
Bartek Iwańczuk
667583fe7f
upgrade: Rust 1.47.0 (#492) 2020-10-09 11:38:18 +02:00
Ben Noordhuis
536ad46d02
v0.11.0 (#489) 2020-10-07 11:55:30 +02:00
Ben Noordhuis
1149ee3ada
Make RUSTY_V8_MIRROR understand file paths (#488)
Fixes #470
2020-10-07 08:39:02 +02:00
Ben Noordhuis
6993fd3a30
Upgrade V8 to 8.7.220.3 (#487) 2020-10-06 20:31:03 +02:00
devsnek
4f924a686a
add all TypedArray constructors (#482) 2020-10-06 14:16:22 -04:00
Inteon
dbc0509f2a
add basic serializer bindings (#442) 2020-10-06 18:39:38 +02:00
Ryan Dahl
18a3eab7c6
Fix docs.rs detection (#485)
Previously docs.rs supplied RUSTDOCFLAGS env var to builds, which we
used to skip building/downloading rusty_v8. docs.rs does not allow
network access.

Reference for DOCS_RS: https://docs.rs/about/builds
Failed build: https://docs.rs/crate/deno_core/0.61.0/builds/299870
2020-10-06 09:34:33 -04:00
devsnek
e5f56e218c
add Symbol, Private, BigInt (#466) 2020-09-29 20:20:07 -04:00
Ben Noordhuis
6b90cbe499
add Object + ObjectTemplate internal field support (#477)
The rusty_v8 API deviates slightly from the V8 C++ API because the
latter is definitely unsound when you pass in out-of-range indexes.
2020-09-29 19:04:59 -04:00
Bert Belder
9bedd96d24
v0.10.0 (#467) 2020-09-11 17:04:14 +02:00
devsnek
405a5a5158
Add APIs to store/retrieve embedder data in a Context or Isolate snapshot (#449)
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2020-09-10 02:39:49 +02:00
Bert Belder
888e5deea1
ci: switch to Github Actions XL (#464) 2020-09-09 16:54:24 +02:00
Bert Belder
b3f9cb1f01
Work around a bug in the V8 headers (#463) 2020-09-09 12:07:11 +02:00
Gus Caplan
3b27748a17
Implement TryFrom<Data> for subclasses of Data (#453) 2020-09-09 02:21:58 +02:00
Bert Belder
6409d8b112
Upgrade V8 to 8.7.75 (#462) 2020-09-08 03:02:57 +02:00
Bert Belder
c564ca286b
Upgrade gn to 6f13aaac & make BUILD.gn compatible with it (#462) 2020-09-08 03:02:56 +02:00
Bert Belder
003169e10e
Upgrade Rust crates (#462) 2020-09-08 03:02:56 +02:00
Bert Belder
81f7a653b2
ci: add workaround for MacOS + Cargo + Github Actions cache bug (#462) 2020-09-08 03:02:56 +02:00
Bert Belder
f15a250221
ci: simplify workflow config by merging Rust installation steps (#462) 2020-09-08 03:02:56 +02:00
Ben Noordhuis
d60e367a9b
Add V8::set_entropy_source() (#460) 2020-09-08 03:01:36 +02:00
Bert Belder
b31dbc89dc
Simplify 'Isolate::get/set_slot()' and use optimized hasher (#461) 2020-09-07 19:50:36 +02:00
Moritz Gunz
8513c8fa69
Add bindings to 'v8::Isolate::LowMemoryNotification()' (#459) 2020-09-07 13:00:35 +02:00
Ben Noordhuis
de58267948
Add V8::set_flags_from_string() (#457) 2020-09-06 15:40:07 -04:00
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