Bert Belder
fb19eecc31
Rename new_null() to null() and new_undefined() to undefined() ( #216 )
...
This is more consistent with V8's C++ API.
2020-01-17 08:34:48 +01:00
Bert Belder
d4cd5d2733
Move error constructors and helper functions under v8::Exception ( #215 )
...
* The purpose of this change is to match the C++ API more closely.
* This patch also increases consistency between the 'extern "C"'
function definitions on the Rust side with those on the C++ side.
* The 'message' parameter (a v8::String) to the various error
constructors no longer needs to be mutable.
2020-01-17 08:22:16 +01:00
Bert Belder
bed0088550
Make function signature of 'AccessorNameGetterCallback' match C++ ( #214 )
2020-01-17 07:39:05 +01:00
Bert Belder
7862af65e0
Make Function::call() more efficient and more idiomatic ( #213 )
2020-01-17 03:59:42 +01:00
Bert Belder
1a65b6cf6b
Format binding.cc ( #213 )
2020-01-17 03:56:04 +01:00
Bert Belder
b09df9b552
Fix bug in v8::create_message() argument lifetimes ( #212 )
2020-01-17 02:24:41 +01:00
Bartek Iwańczuk
f650abe44e
stub out inspector APIs ( #206 )
2020-01-16 18:12:25 -05:00
Bert Belder
a230735902
Refactor scopes and callbacks so users don't need to transmute ( #183 )
2020-01-16 22:48:27 +01:00
Ry Dahl
03cab59c5c
Add Isolate::request_interrupt ( #208 )
2020-01-15 15:33:47 -05:00
Bert Belder
e6fb4d1a65
Reimplement Module::ResolveCallback ABI fix without global variables ( #207 )
2020-01-14 21:15:06 +01:00
Bert Belder
bf28a6b2e3
Remove rust-abi wrapper for v8::ResolveCallback ( #204 )
...
It will be back, but in a different form.
2020-01-13 06:58:26 +01:00
Ry Dahl
63673c3740
Remove unnecessary derive(Debug) ( #195 )
2020-01-06 14:57:15 -05:00
Bartek Iwańczuk
bddefbc2b2
Implicitly enter Isolate in v8::error ( #191 )
2020-01-05 18:07:50 +01:00
Bert Belder
db1c44c9be
Fix: Global::get() now actually creates a new Local handle ( #187 )
...
Closes: #182
2020-01-05 06:08:21 +01:00
Bartek Iwańczuk
2aaa62ae41
Add v8::Boolean::new() ( #184 )
2020-01-05 00:08:27 +01:00
Bert Belder
bd598fe8dc
Improve generated v8::Data type hierarchy and add tests ( #180 )
2020-01-04 03:27:43 +01:00
Bert Belder
e0b8f2d02c
Fix some issues with v8::StartupData ( #178 )
2020-01-04 01:26:27 +01:00
Bartek Iwańczuk
2d77996467
add v8::Module::get_module_namespace ( #177 )
2020-01-03 18:12:45 -05:00
Ry Dahl
19398816ab
SnapshotCreator changes for libdeno ( #176 )
2020-01-03 16:52:05 -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
Bartek Iwańczuk
4ffbb7a00b
InIsolate for PromiseRejectMessage ( #172 )
2020-01-03 08:49:43 -05:00
Bert Belder
64136e684e
Add safe downcasts for Local<Value> with TryFrom ( #166 ) ( #166 )
2020-01-03 08:41:16 -05:00
Bartek Iwańczuk
5c9effbeb1
add SharedArrayBuffer deprecated constructor ( #171 )
...
needed temporarily for porting deno
2020-01-03 08:40:39 -05:00
Bert Belder
e409030541
Create CallbackScope from Promise and PromiseRejectMessage ( #168 )
2020-01-02 16:22:33 -05:00
Ry Dahl
45b766c01f
happy new year ( #170 )
2020-01-02 13:57:00 -05: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
Ry Dahl
53fd83a6fa
Add Isolate::RunMicrotasks and Isolate::EnqueueMicrotask ( #164 )
2020-01-02 10:15:31 -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
Ry Dahl
8f9aafe764
add impl_from and impl_deref macros for data.rs ( #161 )
2019-12-31 13:39:01 -05:00
Bert Belder
c205e73138
Generate Deref implementations for subtypes of v8::Data ( #160 )
2019-12-31 18:33:45 +01:00
Ry Dahl
1f610ba5a5
Add StackFrame ( #159 )
2019-12-31 11:17:26 -05:00
Ry Dahl
5467ca9295
Improve v8::Message ( #158 )
2019-12-31 09:40:34 -05:00
Bartek Iwańczuk
23a49d0fd1
add Isolate::get_current_context() ( #155 )
2019-12-31 14:07:42 +01:00
Kevin (Kun) "Kassimo" Qian
d31960342f
isolate: add termination related methods ( #157 )
2019-12-31 06:11:43 -05:00
Bert Belder
24286a4d71
Add StartupData constructor ( #156 )
2019-12-31 02:43:27 +01:00
Bartek Iwańczuk
6ea175c065
add FunctionCallbackInfo.get_argument() ( #150 )
2019-12-30 16:48:23 -05:00
Bartek Iwańczuk
233160f926
add Send impl for SharedRef<BackingStore> ( #154 )
2019-12-30 16:48:08 -05:00
Ry Dahl
b7fa3341cb
Replace transmute in example with cast ( #153 )
2019-12-30 15:54:24 -05:00
Ry Dahl
38057132cc
get_module_requests_length should return usize ( #151 )
2019-12-30 15:11:50 -05: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
Andy Finch
00d592cd4d
add v8::SharedArrayBuffer ( #134 )
2019-12-28 16:29:42 -05:00
Ryan Dahl
61c74ec0e7
clean up example in docs
2019-12-27 12:04:28 -05:00
Ry Dahl
6f953179ba
External references for snapshots ( #141 )
2019-12-27 09:12:16 -05:00
EnokMan
f2cc688439
add hello world example ( #142 )
2019-12-27 06:41:44 -05:00
Ry Dahl
29fa5388f5
Fix some docs ( #140 )
2019-12-26 21:14:59 -05:00
Ry Dahl
822b6e7025
Add Object::set ( #138 )
2019-12-26 14:38:16 -05:00
Bert Belder
76a480e6ff
Add ArrayBuffer::get_backing_store() and new_with_backing_store() ( #135 )
2019-12-26 18:06:43 +01:00
Ry Dahl
a2196a7248
Clean up internal slots ( #137 )
2019-12-26 11:53:06 -05:00
Ry Dahl
ce38f674f7
Support dynamic import ( #136 )
2019-12-26 10:45:55 -05:00
Andy Finch
6cdb55ed62
add v8::Uint8Array ( #133 )
2019-12-25 20:37:25 -05:00
Ry Dahl
877c22b075
Move new_default_allocator to root namespace ( #132 )
...
And add Isolate::set_data, Isolate::get_data, Isolate::get_number_of_data_slots
2019-12-25 10:56:27 -05:00
Ry Dahl
ce1f74221c
Fix StartupData memory leak ( #131 )
2019-12-25 08:14:55 -05:00
Bert Belder
934dd16e89
Clean up and remove AsRef/AsMut implementations ( #130 )
2019-12-25 12:40:14 +01:00
Bert Belder
ae4b48eb22
Get rid of HandleScope closure, add CallbackScope ( #119 )
2019-12-25 00:31:36 +01:00
Ry Dahl
57d13f7622
support for import.meta ( #128 )
2019-12-24 16:40:41 -05: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
b00ef1ea3c
Move docs for global to struct ( #127 )
2019-12-24 09:44:44 -05:00
Bartek Iwańczuk
1507a897de
first pass at snapshots ( #122 )
...
Creating a snapshot leaks memory. We will address this in future work.
2019-12-24 08:03:32 -05:00
Andy Finch
37a13ae18c
add v8::ArrayBufferView ( #101 )
2019-12-24 05:50:30 -05:00
Ry Dahl
b97abb17b9
default options for v8::script_compiler::compile_module ( #125 )
...
And other clean ups
2019-12-23 20:23:55 -05:00
Ry Dahl
51737506dd
make InstantiateModule work ( #124 )
2019-12-23 18:09:03 -05:00
Ry Dahl
7cb6623488
Add Isolate::throw_exception ( #123 )
2019-12-23 08:16:01 -05:00
Ry Dahl
1d027f08c5
Add Value::strict_equals and Value::same_value ( #121 )
2019-12-23 07:32:45 -05:00
Ry Dahl
3ec3b07638
first pass implementation for v8::Module ( #120 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2019-12-23 07:12:52 -05:00
Bert Belder
ac8aec9c8f
Invert the TryCatch/TryCatchScope relationship ( #118 )
2019-12-22 20:53:45 +01:00
Bartek Iwańczuk
25c4f7f4d0
add v8::EscapableHandleScope ( #113 )
2019-12-22 15:05:39 +01:00
Bert Belder
c107eb871f
Add global (a.k.a Persistent) handles ( #112 )
2019-12-22 01:30:22 +01:00
Ry Dahl
f36e74a648
First pass at BackingStore ( #108 )
2019-12-21 11:05:51 -05:00
Ry Dahl
153018b41b
Add ArrayBuffer, move ArrayBuffer::Allocator to root namespace ( #106 )
2019-12-21 08:50:59 -05:00
Ry Dahl
99baef0169
Add PrimitiveArray and ScriptOrModule ( #105 )
2019-12-21 06:38:26 -05:00
Bert Belder
196b5f60e4
Fix more mutability and lifetime issues ( #103 )
2019-12-21 06:11:12 +01:00
Bert Belder
fab24e032e
Make TryCatchScope public, improve doc strings ( #102 )
2019-12-21 06:11:06 +01:00
Bert Belder
6124554651
Remove 'type' param from v8::String::new() convenience function ( #99 )
2019-12-21 03:23:56 +01:00
Ry Dahl
32fc7e7bef
add v8::Module::instantiate_module ( #98 )
...
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2019-12-20 20:54:14 -05:00
Bert Belder
f839aa221a
Add TryCatch ( #97 )
2019-12-21 02:12:11 +01:00
Bert Belder
331582561b
Add Local lifetimes back ( #95 )
2019-12-21 02:11:54 +01:00
Ry Dahl
bbfaacfe56
Add v8::ScriptCompiler::compile_module ( #96 )
2019-12-20 14:54:20 -05:00
Bartek Iwańczuk
85229bdd8a
add v8::PropertyCallbackInfo ( #68 )
2019-12-20 18:16:44 +01:00
Ry Dahl
9e30db08ce
Remove 'using namespace v8' from binding.cc ( #93 )
2019-12-20 11:26:33 -05:00
Bartek Iwańczuk
beb9272f38
stub out v8::Module ( #69 )
2019-12-20 08:56:32 -05:00
Ry Dahl
e89a968ff2
add more docs and clean up exception, json modules ( #92 )
2019-12-20 08:47:20 -05:00
Ry Dahl
68742be011
Remove lifetimes from Local, HandleScope, Locker ( #90 )
...
add v8_str
2019-12-19 23:36:29 -05:00
Ry Dahl
b610e7cda9
Add v8::Isolate::add_message_listener ( #89 )
2019-12-19 21:34:07 -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
54a7c0ff33
add docs to various structs ( #82 )
2019-12-19 14:14:19 +01:00
Bartek Iwańczuk
cb0d2e3bec
add v8::PromiseRejectMessage ( #65 )
2019-12-19 14:13:33 +01:00
Ry Dahl
52b323e802
Add rustdoc for v8::Local ( #81 )
2019-12-19 07:34:12 -05:00
Bert Belder
1e86b84a3b
Assert that Option<Local<T>> is the same size as *const T ( #79 )
2019-12-19 00:43:55 +01:00
Ryan Dahl
24ca978b33
Add v8::Isolate::set_capture_stack_trace_for_uncaught_exceptions
2019-12-18 17:40:45 -05:00
Bert Belder
0a855e2a64
Move all support functions inside 'namespace support' ( #76 )
2019-12-18 18:14:28 +01:00
Bert Belder
150c27e4c8
Represent v8::Maybe<bool> in rust as Option<bool> ( #73 )
2019-12-18 18:02:46 +01:00
Bert Belder
ff843d6e18
Run clang-format ( #72 )
2019-12-18 14:37:33 +01:00
Ry Dahl
7acbb85398
Move all cc code to binding.cc ( #70 )
2019-12-18 07:37:13 -05:00
Ry Dahl
a2f9b6bc11
Add v8::ScriptOrigin ( #46 )
2019-12-18 05:46:36 -05:00
Bartek Iwańczuk
48f8a000cf
add implementation for v8::ReturnValue ( #67 )
2019-12-17 19:19:40 +01:00
Bartek Iwańczuk
7b094328ea
add v8::ReturnValue ( #66 )
2019-12-15 06:14:09 +08:00
Andy Finch
f37085c370
automatically convert from Local<T> to Local<Value> ( #61 )
2019-12-14 10:40:54 +08:00
Bartek Iwańczuk
a6caa5a42d
add v8::Promise ( #56 )
2019-12-14 09:18:30 +08:00
Bartek Iwańczuk
2cfb80e174
Add v8::Function ( #57 )
2019-12-11 11:43:22 +08:00
Bartek Iwańczuk
b698e2fce3
add v8::Object ( #55 )
2019-12-10 08:14:07 +08:00
Bartek Iwańczuk
41e1f14ab5
add v8::JSON ( #54 )
2019-12-10 06:11:31 +08:00
Bartek Iwańczuk
e6e35a57e9
add v8::Exception ( #50 )
2019-12-09 02:26:58 +01:00
Ryan Dahl
774e34adf1
Deref String to Value
2019-12-09 07:30:20 +08:00
Ryan Dahl
7a233e277e
Add Value::{is_undefined, is_null, is_null_or_undefined}
2019-12-06 10:43:22 -05:00
Ryan Dahl
f9a29cf56c
Add primitive constructors null, undefined, true, false
2019-12-06 10:43:22 -05:00
Bartek Iwańczuk
91b8a70fd2
Add String::length method ( #39 )
2019-12-05 18:28:20 +01:00
Bert Belder
f106ab5b10
Running a minimal script ( #32 )
2019-12-04 19:02:21 +01:00
Ryan Dahl
d94117882a
Move StringBuffer and StringView into inspector namespace
2019-12-04 10:51:46 -05:00
Ryan Dahl
3925b8122c
Move v8::string::NewStringType to v8::NewStringType
2019-12-04 10:51:46 -05:00
Bert Belder
d91f0269fa
Basic Local<String> support ( #27 )
2019-12-04 08:17:13 +01:00
Ry Dahl
803ae45263
Simplify public API and move tests to tests/test_api.rs ( #24 )
2019-12-04 00:57:06 -05:00
Bert Belder
b4674c62b8
Basic support for Local<Number> and Local<Integer> ( #23 )
2019-12-04 01:50:26 +01:00
Ry Dahl
0e02971a35
First pass at test setup function ( #22 )
2019-12-01 09:19:22 -08:00
Ryan Dahl
517c213f1e
minor clean ups
2019-11-30 09:34:41 -08:00
Ryan Dahl
0a256461e2
Rename src/v8.rs to src/V8.rs
2019-11-30 09:34:41 -08:00
Ryan Dahl
5866aedb30
make internal symbols private
2019-11-30 09:34:41 -08:00
Bert Belder
011b9f31a7
First pass at HandleScope ( #18 )
2019-11-27 07:14:39 -08:00
Bert Belder
0339c5f3b3
Create first isolate ( #17 )
2019-11-20 13:36:15 -08:00
Ry Dahl
3fa1cbcc5e
Refactor build / enable 'cargo package' ( #15 )
2019-11-19 17:48:50 -05:00
Bert Belder
7df96332ad
Add binding for ArrayBuffer::Allocator::NewDefaultAllocator ( #13 )
2019-11-18 15:03:12 -08:00
Bert Belder
37a656014b
Work towards creating first Isolate ( #12 )
2019-11-18 13:43:53 -08:00
Ry Dahl
643e1956a1
Rename mod v8 to V8 ( #11 )
2019-11-15 15:57:10 -05:00
Ry Dahl
05ce4006c0
bind v8::V8::Initialize and v8::V8::Dispose ( #10 )
2019-11-15 14:29:19 -05:00
Ry Dahl
3f6812ee60
bind v8::V8::GetVersion ( #9 )
2019-11-15 13:16:49 -05:00
Ry Dahl
c025a918c0
Add binding to v8::V8::SetFlagsFromCommandLine ( #8 )
2019-11-15 12:57:34 -05:00
Ry Dahl
0463a8bbfb
clean up ( #4 )
2019-11-01 13:50:12 -04:00
Ry Dahl
7846160a63
clean up ( #3 )
...
Use .cc instead of .cpp
2019-11-01 00:54:54 -04:00
Ryan Dahl
6bdbe7041a
Fix v8_inspector__StringBuffer__string
2019-10-31 18:55:52 -04:00
Ryan Dahl
fd6f0785a2
First pass at build with cargo_gn
2019-10-31 18:38:14 -04:00
Bert Belder
ca9193fcd7
Remove junk
2019-10-23 00:45:37 -07:00
Bert Belder
0fdeed7c67
wip
2019-10-22 23:14:05 -07:00
Bert Belder
edebd3b10d
WIP
2019-10-22 22:58:11 -07:00
Bert Belder
5b9b9bcea1
idiomacy:
2019-10-22 20:26:13 -07:00
Bert Belder
96e202505f
wip
2019-10-22 20:10:40 -07:00
Bert Belder
6fa76841ce
WIP
2019-10-22 18:59:34 -07:00
Bert Belder
5b927b82af
wip
2019-10-22 15:46:42 -07:00
Bert Belder
c7eb95df04
Remove debug stuff
2019-10-22 15:31:00 -07:00
Bert Belder
9a6e90be38
Add Task
2019-10-22 14:52:43 -07:00
Bert Belder
c3f0fbbeb4
wip
2019-10-21 20:54:21 -07:00
Bert Belder
6a24523334
wip
2019-10-20 16:48:12 -07:00
Bert Belder
0e86101ed9
wip
2019-10-20 16:10:40 -07:00
Bert Belder
1e3f137cc2
wip
2019-10-20 14:22:18 -07:00
Bert Belder
7b8e882546
Client binding + clean-ups
2019-10-19 17:15:23 -07:00
Bert Belder
a291feb5f1
ugly, but works
2019-10-18 16:59:38 -07:00
Bert Belder
8d2d3697f8
Add depot_tools and v8
2019-10-18 16:52:12 -07:00
Bert Belder
5bca90b074
wip
2019-10-17 18:01:55 -07:00
Bert Belder
1764355b5c
wip
2019-10-17 17:58:31 -07:00
Bert Belder
8d97e79d46
wip
2019-10-17 16:46:54 -07:00
Bert Belder
c4a7c969ba
wip
2019-10-16 15:47:34 -07:00
Bert Belder
f9d0a6ba77
works
2019-10-15 18:31:05 -07:00
Bert Belder
f6bc61ec11
x
2019-10-15 13:10:52 -07:00
Bert Belder
1b7422f6cb
yes
2019-10-08 02:51:48 +02:00
Bert Belder
20f5884b50
update
2019-10-08 02:50:18 +02:00
Bert Belder
12a439e55d
clean up
2019-10-08 02:40:03 +02:00
Bert Belder
5931696251
polish
2019-10-08 02:37:30 +02:00
Bert Belder
1b61d2c4da
wip
2019-10-08 02:32:58 +02:00
Bert Belder
16e82f13a0
polish more
2019-10-08 02:13:18 +02:00
Bert Belder
48db2272ca
update
2019-10-08 02:06:48 +02:00
Bert Belder
fdfa52f4bf
initial
2019-10-08 01:56:41 +02:00