Ben Noordhuis
03e74c6f1b
Add new_single_threaded_default_platform() ( #659 )
...
This is a v8::Platform implementation that doesn't spawn additional
threads. Useful in combination with the --single_threaded flag.
2021-04-12 21:40:52 +02:00
Bert Belder
de9a7e2698
String::new_external_onebyte_static() should take &[u8]
instead of &str
( #658 )
2021-04-09 19:49:55 +02:00
Ryan Dahl
d520fe85bd
Add String::new_from_one_byte ( #654 )
2021-04-02 16:23:05 -04:00
Ben Noordhuis
3a5ce45245
Remove dead platform code ( #653 )
...
The Task struct and Platform::pump_message_loop() method were
non-functional, remove them.
2021-03-30 14:33:39 +02:00
Yusuke Tanaka
3c7ff01ad4
Upgrade Rust to 1.51.0 ( #652 )
2021-03-27 20:16:35 +01:00
Ben Noordhuis
7d514ae4cb
Add ArrayBuffer::detach() and is_detachable() ( #648 )
...
Fixes #646 .
2021-03-16 23:35:27 +01:00
Aaron O'Mullan
f2766ed1af
Support for external v8 strings ( #641 )
2021-03-07 10:21:59 -05:00
Heyang Zhou
a6d36d1193
Add more ScriptCompiler APIs ( #638 )
2021-03-07 08:05:50 -05:00
Heyang Zhou
be89cfc131
Add code cache API ( #635 )
2021-03-05 05:26:37 -05:00
Ryan Dahl
83052c4535
Enter isolate on construction, exit on drop
...
Fixes #626
2021-02-20 09:41:26 -05:00
Bartek Iwańczuk
8551c62511
Add Module::source_offset_to_location, deprecate old APIs ( #624 )
2021-02-15 12:08:39 +01:00
Bartek Iwańczuk
ec54f28bfd
feat: Add ModuleRequest ( #623 )
2021-02-14 19:49:37 +01:00
Ryan Dahl
50a15085f7
update copyrights to 2021 ( #620 )
2021-02-13 07:31:18 -05:00
Ben Noordhuis
5dc6117dd7
Fix ValueDeserializer::read_value() lifetime ( #609 )
...
The return value should have the lifetime of the context, not the
deserializer.
Fixes #607 .
2021-02-10 07:27:27 +01:00
Ben Noordhuis
9a8f6443fe
Fix doc comment in src/icu.rs ( #608 )
...
Rustdoc interprets code snippets as Rust unless told otherwise.
Tell it otherwise because this particular snippet is C++.
2021-02-09 23:12:42 +01:00
Bartek Iwańczuk
4ef7ab3fd6
docs: add info about settings --harmony-import-assertions flag ( #606 )
2021-02-09 23:03:25 +01:00
Ryan Dahl
d60489c395
Support ICU ( #603 )
...
Co-authored-by: Kunihiro Ishiguro <kunihiro@zebra.dev>
2021-02-09 09:17:02 -05:00
Ben Noordhuis
64aa11e34d
Add Isolate::set_prepare_stack_trace_callback() ( #594 )
...
Refs: https://github.com/denoland/deno/issues/7644
2021-02-08 13:11:48 +01:00
Ben Noordhuis
8809068f01
build: upgrade Rust to 1.49.0 ( #601 )
2021-02-07 23:49:07 +01:00
Bartek Iwańczuk
d6be279a06
Add support for import assertions ( #598 )
...
This commit adds support for import assertions.
Major changes include:
- removal of "ResolveCallback" (deprecated in V8)
in favor of "ModuleResolveCallback"
- removal of "HostImportModuleDynamicallyCallback" (deprecated in V8)
in favor of "HostImportModuleDynamicallyWithImportAssertionsCallback"
2021-02-05 00:22:26 +01:00
Ben Noordhuis
30ad399f9b
Add V8InspectorClientImpl::generate_unique_id() ( #590 )
2021-01-21 10:06:34 +01:00
Ben Noordhuis
0d093a02f6
Upgrade V8 to 8.9.255.3 ( #567 )
...
This floats https://chromium-review.googlesource.com/c/v8/v8/+/2608209
because it just missed the merge window for 8.9.
2021-01-18 21:46:44 +01:00
Heyang Zhou
bcbe7e9348
Support setting OOM callback on Isolate
( #585 )
2021-01-16 10:30:38 +01:00
Heyang Zhou
3fd7cae994
Expose ArrayBuffer::Allocator interface ( #578 )
2021-01-14 23:29:06 +01:00
Ben Noordhuis
5cb14847aa
Expose v8::WriteOptions ( #583 )
...
Without it, v8::String::write_utf8() is pretty much unusable.
2021-01-13 00:49:59 +01:00
Heyang Zhou
584a037800
Add Script::get_unbound_script() and UnboundScript::bind_to_current_context() ( #572 )
2021-01-11 19:39:51 -08:00
Bert Belder
7a480fd563
Run clang-format ( #582 )
2021-01-11 19:38:20 -08:00
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
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
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
Daniel Bevenius
756388c140
typo ( #554 )
2020-12-10 06:47:32 -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
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
Bert Belder
73d4bfebc5
Improve consistency of some c++ function signatures ( #541 )
2020-11-20 23:34:13 +01:00
Daniel Bevenius
eb0222ce08
docs: Fix typo in scope module comment ( #538 )
2020-11-19 19:20:31 +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
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
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
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