mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-23 15:50:11 -05:00
chore: upgrade Rust to 1.59.0 (#909)
This commit is contained in:
parent
90f2f79c42
commit
6b0dcdb440
8 changed files with 17 additions and 25 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -82,7 +82,7 @@ jobs:
|
|||
uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
rust-version: 1.57.0
|
||||
rust-version: 1.59.0
|
||||
|
||||
- name: Install python
|
||||
uses: actions/setup-python@v2
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.57.0
|
||||
1.59.0
|
||||
|
|
|
@ -371,7 +371,7 @@ impl Isolate {
|
|||
fn get_annex_arc(&self) -> Arc<IsolateAnnex> {
|
||||
let annex_ptr = self.get_annex();
|
||||
let annex_arc = unsafe { Arc::from_raw(annex_ptr) };
|
||||
Arc::into_raw(annex_arc.clone());
|
||||
let _ = Arc::into_raw(annex_arc.clone());
|
||||
annex_arc
|
||||
}
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ impl ObjectTemplate {
|
|||
setter: Option<Local<FunctionTemplate>>,
|
||||
attr: PropertyAttribute,
|
||||
) {
|
||||
assert!(!getter.is_none() || !setter.is_none());
|
||||
assert!(getter.is_some() || setter.is_some());
|
||||
|
||||
unsafe {
|
||||
let getter = getter.map_or_else(std::ptr::null, |v| &*v);
|
||||
|
|
|
@ -368,14 +368,10 @@ impl<'a, 's> ValueDeserializer<'a, 's> {
|
|||
let mut value_deserializer_heap = Box::pin(ValueDeserializerHeap {
|
||||
value_deserializer_impl,
|
||||
cxx_value_deserializer: CxxValueDeserializer {
|
||||
_cxx_vtable: CxxVTable {
|
||||
0: std::ptr::null(),
|
||||
},
|
||||
_cxx_vtable: CxxVTable(std::ptr::null()),
|
||||
},
|
||||
cxx_value_deserializer_delegate: CxxValueDeserializerDelegate {
|
||||
_cxx_vtable: CxxVTable {
|
||||
0: std::ptr::null(),
|
||||
},
|
||||
_cxx_vtable: CxxVTable(std::ptr::null()),
|
||||
},
|
||||
context: scope.get_current_context(),
|
||||
});
|
||||
|
|
|
@ -410,14 +410,10 @@ impl<'a, 's> ValueSerializer<'a, 's> {
|
|||
let mut value_serializer_heap = Box::pin(ValueSerializerHeap {
|
||||
value_serializer_impl,
|
||||
cxx_value_serializer: CxxValueSerializer {
|
||||
_cxx_vtable: CxxVTable {
|
||||
0: std::ptr::null(),
|
||||
},
|
||||
_cxx_vtable: CxxVTable(std::ptr::null()),
|
||||
},
|
||||
cxx_value_serializer_delegate: CxxValueSerializerDelegate {
|
||||
_cxx_vtable: CxxVTable {
|
||||
0: std::ptr::null(),
|
||||
},
|
||||
_cxx_vtable: CxxVTable(std::ptr::null()),
|
||||
},
|
||||
buffer_size: 0,
|
||||
context: scope.get_current_context(),
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
error[E0277]: the trait bound `OwnedIsolate: v8::scope::param::NewEscapableHandleScope<'_, '_>` is not satisfied
|
||||
--> $DIR/handle_scope_escape_to_nowhere.rs:5:50
|
||||
--> tests/compile_fail/handle_scope_escape_to_nowhere.rs:5:50
|
||||
|
|
||||
5 | let mut _scope = v8::EscapableHandleScope::new(&mut isolate);
|
||||
| ----------------------------- ^^^^^^^^^^^^ the trait `v8::scope::param::NewEscapableHandleScope<'_, '_>` is not implemented for `OwnedIsolate`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by `EscapableHandleScope::<'s, 'e>::new`
|
||||
--> $DIR/scope.rs:303:3
|
||||
note: required by a bound in `EscapableHandleScope::<'s, 'e>::new`
|
||||
--> src/scope.rs
|
||||
|
|
||||
303 | / pub fn new<P: param::NewEscapableHandleScope<'s, 'e>>(
|
||||
304 | | param: &'s mut P,
|
||||
305 | | ) -> P::NewScope {
|
||||
| |__________________^
|
||||
| pub fn new<P: param::NewEscapableHandleScope<'s, 'e>>(
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EscapableHandleScope::<'s, 'e>::new`
|
||||
|
||||
error[E0277]: the trait bound `OwnedIsolate: v8::scope::param::NewEscapableHandleScope<'_, '_>` is not satisfied
|
||||
--> $DIR/handle_scope_escape_to_nowhere.rs:5:20
|
||||
--> tests/compile_fail/handle_scope_escape_to_nowhere.rs:5:20
|
||||
|
|
||||
5 | let mut _scope = v8::EscapableHandleScope::new(&mut isolate);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `v8::scope::param::NewEscapableHandleScope<'_, '_>` is not implemented for `OwnedIsolate`
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::convert::{Into, TryFrom, TryInto};
|
|||
use std::ffi::c_void;
|
||||
use std::ffi::CStr;
|
||||
use std::hash::Hash;
|
||||
use std::mem::MaybeUninit;
|
||||
use std::os::raw::c_char;
|
||||
use std::ptr::NonNull;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
@ -156,6 +157,7 @@ fn global_handle_drop() {
|
|||
let _setup_guard = setup();
|
||||
|
||||
// Global 'g1' will be dropped _after_ the Isolate has been disposed.
|
||||
#[allow(clippy::needless_late_init)]
|
||||
let _g1: v8::Global<v8::String>;
|
||||
|
||||
let isolate = &mut v8::Isolate::new(Default::default());
|
||||
|
@ -5239,7 +5241,7 @@ fn run_with_rust_allocator() {
|
|||
n: usize,
|
||||
) -> *mut c_void {
|
||||
count.fetch_add(n, Ordering::SeqCst);
|
||||
let mut store = Vec::with_capacity(n);
|
||||
let mut store: Vec<MaybeUninit<u8>> = Vec::with_capacity(n);
|
||||
store.set_len(n);
|
||||
Box::into_raw(store.into_boxed_slice()) as *mut [u8] as *mut c_void
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue