Bartek Iwańczuk
4b3b081c03
Add support for Fast calls with Uint8Array ( #1047 )
2022-08-13 19:56:29 +02:00
Divy Srivastava
606fee5ec7
support V8 FastApiCallbackOptions ( #1044 )
2022-08-03 16:07:18 +05:30
denobot
21a8d4a580
Rolling to V8 10.5.218.1 ( #1036 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-25 19:22:32 +02:00
Divy Srivastava
3be46ecc52
Support Fast API Overloads ( #1031 )
2022-07-16 19:57:58 +05:30
Divy Srivastava
08e1a1c361
Add v8::Object [Get/Set]AlignedPointer[From/In]InternalField
( #1026 )
2022-07-13 12:35:31 +05:30
Aapo Alasuutari
d8480fc7ef
Add Uint32 / Int32 Value method bindings ( #1030 )
2022-07-13 09:33:55 +05:30
denobot
d2db387448
Rolling to V8 10.4.132.16 ( #1012 )
2022-07-12 22:27:57 +00:00
Divy Srivastava
47a7bece35
V8 Fast API Sequence ( #1022 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-08 08:54:24 +05:30
Divy Srivastava
1d0a4c1792
V8 Fast API Calls ( #1021 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-07 16:30:35 +05:30
Divy Srivastava
e6b443a6e8
Add ReturnValue::set_bool
( #1020 )
2022-07-04 07:02:13 +05:30
Divy Srivastava
95f2ba399c
Expose from_function_callback_info
( #1016 )
2022-06-28 16:49:37 +05:30
Divy Srivastava
f5d275f622
Add type specialized setters for v8::ReturnValue ( #1015 )
2022-06-27 08:12:06 +05:30
denobot
c53d85114e
Rolling to V8 10.4.132.5 ( #1002 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-06-15 00:26:50 +02:00
Andreu Botella
d43535c48b
ShadowRealm
integration callback (#959 )
2022-05-24 16:26:12 +02:00
Chengzhong Wu
5f90045ad0
feat: add Context::get_extras_binding_object ( #975 )
2022-05-24 15:57:35 +02:00
Colin Ihrig
0605e9bc34
feat: add ObjectTemplate::set_immutable_proto() ( #977 )
...
This commit exposes SetImmutableProto().
2022-05-19 18:15:32 -04:00
Andreu Botella
15ac9f4533
feat: Context
slots ( #937 )
2022-05-19 23:24:58 +02:00
Bert Belder
8b36e84060
test: make the 'heap_limits' test run a lot faster ( #972 )
2022-05-18 12:06:12 +02:00
Bert Belder
2f189e1668
Upgrade V8 to 10.3.174.3 ( #969 )
2022-05-18 10:53:34 +02:00
Spencer
0cd8ae6f16
feat: add FunctionTemplate::instance_template binding ( #952 )
2022-05-09 19:43:33 +02:00
Andreu Botella
1ed35fd22e
feat: Weak handles and finalizers ( #895 )
...
This change adds support for weak handles that don't prevent GC of the
referenced objects, through the `v8::Weak<T>` API. A weak handle can
be empty (if it was created empty or its object was GC'd) or
non-empty, and if non-empty it allows getting its object as a global
or local.
When creating a `v8::Weak` you can also set a finalizer that will be
called at some point after the object is GC'd, as long as the weak
handle is still alive at that point. This finalization corresponds to
the second-pass callback in `kParameter` mode in the C++ API, so it
will only be called after the object is GC'd. The finalizer function
is a `FnOnce` that may close over data, and which takes a
`&mut Isolate` as an argument.
The C++ finalization API doesn't guarantee _when_ or even _if_ the
finalizer will ever be called, but in order to prevent memory leaks,
the rusty_v8 wrapper ensures that it will be called at some point,
even if it's just before the isolate gets dropped.
`v8::Weak<T>` implements `Clone`, but a finalizer is tied to a single
weak handle, so its clones won't be able to keep the finalizer alive.
And in fact, cloning will create a new weak handle that isn't tied to
a finalizer at all. `v8::Weak::clone_with_finalizer` can be used to
make a clone of a weak handle which has a finalizer tied to it.
Note that `v8::Weak<T>` doesn't implement `Hash`, because the hash
would have to change once the handle's object is GC'd, which is a big
gotcha and would break some of the algorithms that rely on hashes,
such as the Rust std's `HashMap`.
2022-05-09 12:20:55 +02:00
Luca Casonato
2dcced58d1
feat: add WasmModuleObject::compile bindings ( #960 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-05-07 18:02:39 +02:00
legendecas
196145abf1
feat: add binding for Context::SetPromiseHooks ( #938 )
2022-05-05 18:31:29 +02:00
Aaron O'Mullan
7772779210
feat: v8::ArrayBuffer::new_backing_store_from_vec ( #946 )
...
So we can avoid `.into_boxed_slice()` calls which may require a (costly) memmove when instantiating from a Vec
2022-04-20 19:36:10 +02:00
DjDeveloper
aa9f78e09c
feat: ArrayBuffer::new_backing_store_from_ptr ( #926 )
2022-04-05 15:55:25 +02:00
Bert Belder
48cc6cb791
Sync V8 heap object type hierarchy with C++ ( #929 )
2022-03-25 03:15:30 +01:00
Bert Belder
25dd770570
perf: avoid double boxing of Arc/Box/Rc in Isolate slot ( #925 )
2022-03-21 11:50:45 +01:00
Aaron O'Mullan
aaacaa292f
feat: raw APIs to build v8::Functions from ptrs ( #917 )
...
Unblocks https://github.com/denoland/deno/pull/13861
The MapFnTo trait is quite contrived and can't be turned into a trait object thus blocking declarative ops
2022-03-10 23:04:48 +01:00
Ryan Dahl
184467a9cc
Upgrade to ICU 70 ( #919 )
2022-03-10 09:27:22 -08:00
github-actions[bot]
b91d363d2f
Rolling to V8 10.0.139.6 ( #915 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-03-09 14:41:46 +01:00
Divy Srivastava
6b0dcdb440
chore: upgrade Rust to 1.59.0 ( #909 )
2022-03-02 17:30:58 +05:30
Divy Srivastava
90f2f79c42
Add ObjectTemplate::set_accessor_property ( #908 )
2022-03-02 15:40:54 +05:30
Romain Marcadier
2404d208f5
feat: add bindings for String::kMaxLength and TypedArray::kMaxLength ( #904 )
2022-02-22 21:23:28 -08:00
Divy Srivastava
fe447c88df
feat: support adding raw pointers to ExternalReferences ( #901 )
2022-02-18 16:08:54 -08:00
Bartek Iwańczuk
da7ef32ead
feat: v8::Global::from_raw, v8::Global::into_raw ( #902 )
...
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-02-18 01:26:00 +01:00
Divy Srivastava
41003d097d
Add v8::FunctionCallbackInfo::NewTarget bindings ( #898 )
2022-02-11 20:51:13 +05:30
Divy Srivastava
378631e793
Add v8::Object::HasOwnProperty bindings ( #897 )
2022-02-11 10:04:14 +05:30
Divy Srivastava
0f34359fb4
Add v8::Value::InstanceOf bindings ( #879 )
2022-02-11 08:27:56 +05:30
Romain Marcadier
db7229ef14
Add bindings for v8::ScriptCompiler::CreateCodeCacheForFunction ( #888 )
2022-02-04 06:29:53 -08:00
github-actions[bot]
b12987ac81
Rolling to V8 9.9.115.5 ( #887 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-02-02 00:51:14 +01:00
Romain Marcadier
a09d392711
Make v8::script_compiler::Source.get_cached_data return Option ( #885 )
...
The `cached_data` property of `Source` is optional, so reading the value
should return `Option<&CachedData>`.
2022-02-01 01:15:49 +01:00
Romain Marcadier
729c5b323f
Add support for v8::Object.set_integrity_level ( #874 )
...
This allows making objects frozen or sealed from rust code. This is
useful to control mutations that are allowed to happen in JS on the
given object.
2022-01-24 11:09:05 +01:00
Ben Noordhuis
8e9fd60e79
Fix unused import warning ( #875 )
2022-01-22 04:10:38 +01:00
Romain Marcadier
2180716923
Add v8::Map bindings ( #872 )
...
Support v8::Map operations (`new`, `clear`, `get`, `set`, `has`,
and `delete`).
2022-01-19 19:01:55 +01:00
Divy Srivastava
a29740df6b
Add aarch64-linux-android support ( #860 )
2022-01-04 21:32:48 +01:00
Aaron O'Mullan
b3e09e69a0
feat: v8::StackTrace::CurrentStackTrace() bindings ( #800 )
2021-12-28 16:52:12 +01:00
Bert Belder
65e78fd960
chore: upgrade Rust to 1.57.0 ( #856 )
2021-12-14 21:25:10 -08:00
Andreu Botella
06648dd1bd
fix: segfault when dropping BackingStore
constructed from empty slice ( #851 )
...
This fixes in a segmentation fault when dropping a `BackingStore`
constructed through `ArrayBuffer::new_backing_store_from_boxed_slice()`
from an empty slice, since zero length boxed slices are invalid
(dangling) pointers, while Rust expects a `Box<c_void>` to always be a
valid pointer.
Fixes: #849
2021-12-13 15:37:59 -08:00
Bert Belder
b6a16916ce
test: don't use --harmony-top-level-await
flag ( #854 )
...
Top level await is now enabled by default and the flag no longer exists.
2021-12-12 21:25:01 -08:00
Sujay Jayakar
62d33c4d7e
Add Function::GetScript{Line,Column}Number bindings ( #843 )
2021-11-30 21:55:41 +01:00