0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-22 15:07:00 -05:00
Commit graph

266 commits

Author SHA1 Message Date
Ryan Dahl
2e61735f44
add test for schedule_pause_on_next_statement (#258) 2020-01-28 16:33:34 -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
Ben Noordhuis
683aa2b2a9 Add V8InspectorClientImpl::console_api_message() (#252)
This makes it possible to intercept console.log() messages through
the V8 inspector API.
2020-01-24 09:33:54 -05:00
Ryan Dahl
6303158de0 Add no_inline_line_tables support 2020-01-23 14:53:04 -05:00
Ryan Dahl
093e09217c SharedArrayBuffer::new_backing_store_from_boxed_slice doesn't need to be unsafe 2020-01-23 14:24:03 -05:00
Ryan Dahl
96309e9679 v0.2.0 2020-01-23 11:57:25 -05:00
Ryan Dahl
db33bc9aec Expose TaskBase and TaskImpl 2020-01-23 11:57:25 -05:00
Ryan Dahl
aca89c2055
new_backing_store_from_boxed_slice doesn't need to be unsafe (#247) 2020-01-23 10:17:23 -05:00
Bert Belder
7e27c88708
Remove TODO comment that's no longer relevant (#246) 2020-01-23 00:01:53 +01:00
Bert Belder
5e55cc5a5c
Add binding for Isolate::get_entered_or_microtask_context() (#245)
A test will be added later.
2020-01-22 23:36:52 +01:00
Bert Belder
2286052468
Rename String::new_empty() to String::empty() (#244)
This is more consistent with the C++ API.
2020-01-22 23:21:56 +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
Bert Belder
dcb94533f8
Make SharedRef<T> deref to UnsafeCell<T> instead of T (#242)
Closes: #240
2020-01-22 22:29:03 +01:00
Bert Belder
bf128554fc
Implement Clone for SharedRef<T> (#241) 2020-01-22 22:02:44 +01:00
Ben Noordhuis
ab3a086132 Add String::new_empty() (#238) 2020-01-22 17:23:42 +01:00
Andy Finch
d302180ffa remove pub use support::int; #235 (#239) 2020-01-22 11:01:49 -05:00
Bert Belder
9124720c5a
8-bit StringView uses latin-1 encoding, not UTF-8 (#237) 2020-01-22 00:11:29 +01:00
Ben Noordhuis
4b8573a993 Implement fmt::Display for StringView (#236)
Make StringView objects inspectable to make it easier to debug the
V8 inspector's wire protocol.

StringBuffer objects can't be inspected yet because they need a mutable
reference if they want to call `StringBuffer::string()`, which makes
sense because that method calls out to a C++ virtual method that can
modify the object.

For now, instances can be inspected like this:

    let mut sb = StringBuffer::create(...);
    println!("StringBuffer({})", sb.string().unwrap());

Closes #233
2020-01-21 17:33:51 -05:00
Bert Belder
1a1bac3883
Make BackingStore APIs more consistent with C++ (#234) 2020-01-21 16:23:47 +01:00
Ryan Dahl
3c1c52fb33 v0.1.1 2020-01-21 09:45:32 -05:00
Ryan Dahl
791cbc627a Add docs about scopes to lib.rs 2020-01-21 09:45:32 -05:00
Bert Belder
b3d93dad78
Some clean-ups after making Locker a Scope (#231) 2020-01-21 03:16:55 +01:00
Bert Belder
44d58f8f48
Make Locker also a Scope (#229) 2020-01-21 02:03:45 +01:00
Bert Belder
937704ab76
Disable test 'handle_scope_escape_to_nowhere' on Windows CI (#227) 2020-01-20 23:34:34 +01:00
Bert Belder
36a12142f2
Make EscapableHandleScope::escape() inheritable, tighten lifetimes (#227) 2020-01-20 23:34:28 +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
Ben Noordhuis
42af31ff38
Add Context::new_from_template() (#225) 2020-01-19 21:58:44 +01:00
Ben Noordhuis
2db5e10b9f
Add FunctionTemplate::set_class_name() (#225) 2020-01-19 21:58:35 +01:00
Ben Noordhuis
7b0269b447
Add ObjectTemplate and Template::set() (#225)
The ObjectTemplate type already existed but now it can also be
instantiated.

This commit also adds Template::set() to actually make that useful.
2020-01-19 21:58:20 +01:00
Bert Belder
2a7868daa9
Forgot to delete file (#224) 2020-01-18 15:31:39 +01:00
Bert Belder
6c1d65252a
Add ContextScope and lay foundations for scope inheritance (#223) 2020-01-18 13:41:28 +01:00
Bert Belder
00d8eb8e16
Fix methods that should require '&mut Isolate' but didn't (#222) 2020-01-17 15:40:29 +01:00
Ry Dahl
52067dc4da
Upgrade deps (#221) 2020-01-17 09:27:13 -05:00
Ry Dahl
7a198e0c7e
Reduce nested symbols in API (#220)
- Don't expose empty mod array_buffer_view
- Move v8::platform::new_default_platform() to v8::new_default_platform()
- Move v8::platform::Task to v8::Task
- Move v8::platform::Platform to v8::Platform
2020-01-17 09:26:42 -05:00
Bartek Iwańczuk
bc927c7477 ArrayBuffer::new_backing_store_from_boxed_slice (#202) 2020-01-17 14:41:12 +01:00
Ben Noordhuis
52b8bbaf82 Fix Module::get_module_namespace() doc comment (#219) 2020-01-17 08:01:19 -05:00
Bert Belder
8741681256
Remove unnecessary explicit drop() calls from tests (#218) 2020-01-17 09:04:30 +01:00
Bert Belder
6925e78819
Do not export Isolate::enter() and Isolate::exit() methods (#217) 2020-01-17 08:57:27 +01:00
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
22bf9c6a39
v0.1.0 2020-01-16 23:05:01 +01:00
Bert Belder
2e66329666
Upgrade dependencies (#211) 2020-01-16 23:04:54 +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
Ry Dahl
9d24f58765
Move clang download to target/debug/clang (#210)
To prevent rebuilds due to the compiler being in random directories.
2020-01-16 14:20:57 -05:00
Ry Dahl
03cab59c5c
Add Isolate::request_interrupt (#208) 2020-01-15 15:33:47 -05:00