Luca Casonato
43b798a39d
Add more Object methods ( #1240 )
...
Specifically Object::get_own_property_descriptor
and Object::get_property_attributes
2023-05-25 13:04:50 +00:00
Giovanny Gutiérrez
e0c8cb50e8
feat: Expose set_accessor_with_configuration to include data and property attribute ( #1220 )
2023-04-28 00:39:09 +02:00
Giovanny Gutiérrez
fb20194130
feat: Add bindings for "v8::Set" ( #1221 )
2023-04-28 00:38:16 +02:00
Bartek Iwańczuk
f049ad0229
feat: Add v8::Object::get_constructor_name ( #1212 )
2023-04-21 23:53:51 +02:00
Divy Srivastava
55e8a2d60d
feat: Add v8::Object::DefineProperty ( #1172 )
2023-01-24 21:03:00 +05:30
Nils Hasenbanck
e89d532b57
Remove libc dependency. ( #1117 )
...
Use `std` functionality where possible. Only size_t needs
to be defined like was done with the `intptr_t` type before.
Also unifies the usage of `std::os::raw` types that where
already defined in the support module.
2022-11-24 20:23:52 +05:30
Divy Srivastava
9f78b0abe7
Inline API functions ( #1078 )
2022-09-21 08:15:33 +05:30
Darshan Sen
dbf19c8545
Improve Object::get_property_names()
and Object::get_own_property_names()
( #1049 )
...
This change allows the customization of the behavior of
v8::Object::GetOwnPropertyNames() and v8::Object::GetPropertyNames() by
accepting all the options that the raw V8 API supports.
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-09-03 18:11:40 +02:00
Divy Srivastava
08e1a1c361
Add v8::Object [Get/Set]AlignedPointer[From/In]InternalField
( #1026 )
2022-07-13 12:35:31 +05:30
Bert Belder
48cc6cb791
Sync V8 heap object type hierarchy with C++ ( #929 )
2022-03-25 03:15:30 +01:00
Divy Srivastava
378631e793
Add v8::Object::HasOwnProperty bindings ( #897 )
2022-02-11 10:04:14 +05:30
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
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
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
Ben Noordhuis
1c38b66093
Add Object::get_private() and friends ( #498 )
2020-10-15 14:37:29 +02: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
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
Skyler Lipthay
8ebfb027c0
Add 'Object::has(_index)' and 'Object::delete(_index)' ( #412 )
2020-07-03 14:41:40 +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
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
54f6bfe8c1
Reflow comments and strings that exceed the 80-char column limit ( #407 )
2020-06-17 06:15:08 +02:00
Bert Belder
771acbab02
Reflow comment and fix a typo in it ( #391 )
...
Closes: #374
2020-05-31 23:05:23 +02:00
Max Bruce
1937d30eba
Add bindings for 'Object::get_(own)_property_names()' ( #337 )
...
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2020-05-31 23:04:01 +02:00
Bert Belder
d1ac68f0c8
Always use raw pointers to send V8 handles between C++ and Rust ( #349 )
...
And other pointer usage touch-ups on the C++ side:
- const parameters are passed by & reference.
- mutable parameters are passed by * pointer.
2020-04-14 00:34:32 +02:00
FrankBlue
5a5bad9adf
add Map::size and Map::as_array ( #333 )
2020-04-02 13:37:13 -04:00
Max Bruce
6bf57abb5c
Implement GetPrototype and SetPrototype on objects ( #321 )
2020-03-23 11:39:43 -04:00
Ben Noordhuis
5d0b9fd760
Add some Array methods ( #283 )
2020-02-14 09:42:54 -05:00
Ben Noordhuis
9e14f18347
Add Object::creation_context() ( #255 )
...
And also Array::creation_context(), Function::creation_context(), etc.,
because they inherit from Object.
2020-01-26 17:42:28 +01:00
Bert Belder
8617f77fd3
Refactor v8::Object bindings ( #243 )
...
* Rename `Object::new2()` to `Object::with_prototype_and_properties()`.
* Make `Object::with_prototype_and_properties()` take a slice of keys
and a slice of values as arguments, instead of using
`Vec<v8::Local<v8::Name>>` and `Vec<v8::Local<v8::Value>>>`.
* Remove type `MaybeBool` from the public interface. These methods now
return `Option<bool>` instead.
* Fix parameter type mismatches between Rust and C++ APIs.
2020-01-22 23:13:58 +01:00
Ben Noordhuis
6efb395fdc
Add Object::define_own_property() ( #228 )
...
This commit introduces the NONE, READ_ONLY, DONT_ENUM and DONT_DELETE
property attributes.
2020-01-20 11:16:24 -05:00
Bert Belder
bed0088550
Make function signature of 'AccessorNameGetterCallback' match C++ ( #214 )
2020-01-17 07:39:05 +01:00
Bert Belder
a230735902
Refactor scopes and callbacks so users don't need to transmute ( #183 )
2020-01-16 22:48:27 +01:00
Bartek Iwańczuk
6c5f189063
add Object::get_identity_hash ( #169 )
2020-01-02 19:56:28 +01:00
Ry Dahl
65f12fbdc0
Add Object::set_accessor ( #167 )
2020-01-02 12:01:36 -05:00
Bartek Iwańczuk
7b139afbc4
add v8::Array::new() ( #165 )
2020-01-02 10:41:40 -05:00
Bert Belder
c205e73138
Generate Deref implementations for subtypes of v8::Data ( #160 )
2019-12-31 18:33:45 +01:00
Bert Belder
9a72f62bd6
Add complete V8 type hierarchy ( #148 )
2019-12-30 19:06:45 +01:00
Ry Dahl
43b3438cb1
Simplify Object constructor ( #149 )
2019-12-30 12:14:06 -05:00
Ry Dahl
822b6e7025
Add Object::set ( #138 )
2019-12-26 14:38:16 -05:00
Bert Belder
ae4b48eb22
Get rid of HandleScope closure, add CallbackScope ( #119 )
2019-12-25 00:31:36 +01:00
Ry Dahl
d65c604f3a
Add Object::create_data_property, Object::get, Value::is_array, Value::is_object, Value::is_function ( #129 )
2019-12-24 16:10:40 -05:00
Bert Belder
331582561b
Add Local lifetimes back ( #95 )
2019-12-21 02:11:54 +01:00
Ry Dahl
68742be011
Remove lifetimes from Local, HandleScope, Locker ( #90 )
...
add v8_str
2019-12-19 23:36:29 -05:00
Ryan Dahl
887af28790
Remove LockedIsolate
2019-12-19 20:32:47 -05:00
Ryan Dahl
71140b4cc4
Change HandleScope::enter to take &Isolate, make v8::Locker into opaque blob
2019-12-19 20:32:47 -05:00
Ry Dahl
11ba352065
Rename CxxIsolate to Isolate and Isolate to OwnedIsolate ( #85 )
2019-12-19 19:15:52 -05:00
Bartek Iwańczuk
cb0d2e3bec
add v8::PromiseRejectMessage ( #65 )
2019-12-19 14:13:33 +01:00