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

717 commits

Author SHA1 Message Date
Daniel Bevenius
54a72d7628
Remove set_flags_from_command_line_with_usage test (#570)
This commit removes the set_flags_from_command_line_with_usage and puts
it in an example code section instead.

The motivation for doing this is that the test output currently contains
the usage string and all the V8 options which creates a lot of output
when the tests is run regardless if --nocapture is used or not.
2021-01-07 22:42:30 +01:00
Bert Belder
b19d0dc349
Sync third-party dependencies and build tools with Chromium (#568) 2021-01-01 18:02:58 -08:00
Bert Belder
52ef869de7
Sync libc++ and libc++abi revision with upstream (#568) 2021-01-01 18:02:51 -08:00
Ben Noordhuis
ea412d0554
Add Isolate::set_wasm_streaming_callback() (#560)
Add the hook necessary to implement `WebAssembly.compileStreaming()`.

Fixes #556
2020-12-31 16:06:29 +01:00
Bartek Iwańczuk
41f29a19c4
Isolate::thread_safe_handle() no longer requires mutable reference (#562) 2020-12-30 23:30:30 -08:00
Bartek Iwańczuk
f22a00e726
Revert "Use "include" to specify kept files (#559)" (#565)
This reverts commit e057d096fd.
2020-12-28 12:07:22 +01:00
Bartek Iwańczuk
25622e306a
v0.15.0 2020-12-28 01:19:24 +01:00
Bartek Iwańczuk
fff1010d1e
v8 8.8.294 (#563) 2020-12-27 23:07:17 +01:00
mash-graz
6c54f184cb
use lockfile to prevent linking of partially downloaded lib (#543) 2020-12-27 17:37:14 +01:00
Bartek Iwańczuk
cf7bb2d001
Add methods for termination to Isolate (#561)
This commit adds following methods to Isolate:
- terminate_execution
- cancel_terminate_execution
- is_execution_terminating
2020-12-25 22:45:57 +01:00
Avindra Goolcharan
810c108170
Improve ninja/gn detection (#558)
This should allow people to build without explicitly setting GN and
NINJA env vars.

If the tool(s) are detected, the build will continue without trying to
download the binaries.
2020-12-25 10:20:53 +01:00
Avindra Goolcharan
e057d096fd
Use "include" to specify kept files (#559) 2020-12-25 10:15:35 +01:00
Daniel Bevenius
756388c140
typo (#554) 2020-12-10 06:47:32 -05:00
Ryan Dahl
3c5f7976b9
v0.14.0 2020-12-07 18:09:47 -05:00
Ben Noordhuis
f37601cab2
Add FunctionBuilder (#512)
v8::Function and v8::FunctionTemplate have a lot of options that can be
configured. The builder() associated functions on those types help with
that.
2020-12-07 17:03:46 -05:00
Ben Noordhuis
530c876aff
Make Private work with context-less HandleScope (#549)
v8::Private is like v8::String and other primitives, it doesn't need an
active v8::Context.
2020-12-07 16:48:51 -05:00
Daniel Bevenius
4e8eaf94c3
Add set_flags_from_command_line_with_usage (#536)
The motivation for this is to enable embedders of rusty_v8 to
pass their own usage string and have their usage printed before V8's
options.
2020-12-07 16:46:38 -05:00
Daniel Bevenius
98bb4506d9
typo (#540) 2020-12-07 16:42:37 -05:00
Daniel Bevenius
29396ed40a
typo (#542) 2020-12-07 15:32:09 -05:00
Ben Noordhuis
343d7f2800
Make Symbol work with context-less HandleScope (#550)
v8::Symbol is like v8::String and other primitives, it doesn't need an
active v8::Context.
2020-12-04 13:56:55 +01:00
Ben Noordhuis
c1509cac08
Make PromiseHookType Clone, Copy and PartialEq (#548) 2020-12-04 13:56:27 +01:00
Ben Noordhuis
5b0764a811
Refactor build script. (#546)
Apply some DRY to build.rs to pave the way for upcoming changes.
2020-11-30 16:35:56 +01:00
Bert Belder
73d4bfebc5
Improve consistency of some c++ function signatures (#541) 2020-11-20 23:34:13 +01:00
Bartek Iwańczuk
fe049f0e57
v0.13.0 2020-11-19 20:00:10 +01:00
Bartek Iwańczuk
2d68950e7e
build: upgrade Rust to 1.48.0 (#535) 2020-11-19 19:44:06 +01:00
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