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
Bert Belder
d3f6e4d36c
Add 'Value::same_value_zero()' ( #414 )
2020-07-04 07:11:04 +02:00
Skyler Lipthay
1b84bc74f6
Add 'Value::boolean_value()' and 'Value::to_boolean()' ( #412 )
2020-07-03 14:42:19 +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
405a874c36
Fix remaining Local::from_raw()
misuse, and correct some lifetimes ( #388 )
2020-05-31 19:00:04 +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
Bert Belder
926f3a19da
Update generated types/traits, and generate more types ( #300 )
2020-03-05 17:42:55 -08:00
Bert Belder
ddc8062644
Move get_*_context() methods to scope::Entered, remove InContext trait ( #279 )
...
The `get_current_context()` and `get_entered_or_microtask_context()`
methods now return `Option<Local<Context>>` to reflect that an isolate
may not have entered any context.
They're also moved from `Isolate` to `struct Entered` because it turns
out that the underlying V8 API calls actually create new local handles,
hence they should only be used inside an active HandleScope.
The `InContext` trait has been removed.
A test exercising `ContextScope` and the `get_*_context()` methods
mentioned above was added.
Closes: #248 .
2020-02-12 22:00:31 -08:00
Ryan Dahl
4f449b6ec6
Upgrade V8 to 8.1.310 ( #263 )
...
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2020-01-30 20:44:28 -05:00
Ry Dahl
a4f519c643
Add Value::{number_value, integer_value, uint32_value, int32_value}
...
#174
2020-01-03 12:17:11 -05:00
Ry Dahl
8adf85ea89
add to_uint32, to_int32, to_integer, to_detail_string, to_big_int ( #173 )
2020-01-03 11:14:50 -05:00
EnokMan
8d6ad51662
add all value checkers ( #163 )
2020-01-01 09:56:59 -05:00
Ry Dahl
e501f6d854
Add Value::{ToString, ToNumber, ToObject} ( #162 )
2019-12-31 15:17:52 -05:00
Bert Belder
9a72f62bd6
Add complete V8 type hierarchy ( #148 )
2019-12-30 19:06:45 +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
Ry Dahl
1d027f08c5
Add Value::strict_equals and Value::same_value ( #121 )
2019-12-23 07:32:45 -05:00
Ry Dahl
99baef0169
Add PrimitiveArray and ScriptOrModule ( #105 )
2019-12-21 06:38:26 -05:00
Bartek Iwańczuk
54a7c0ff33
add docs to various structs ( #82 )
2019-12-19 14:14:19 +01:00
Ryan Dahl
7a233e277e
Add Value::{is_undefined, is_null, is_null_or_undefined}
2019-12-06 10:43:22 -05:00
Bert Belder
d91f0269fa
Basic Local<String> support ( #27 )
2019-12-04 08:17:13 +01:00
Bert Belder
b4674c62b8
Basic support for Local<Number> and Local<Integer> ( #23 )
2019-12-04 01:50:26 +01:00