mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
upgrade: rusty_v8 0.15.0, v8 8.8.294 (#8898)
This commit is contained in:
parent
9419c06ab5
commit
c98c487fda
3 changed files with 18 additions and 19 deletions
15
Cargo.lock
generated
15
Cargo.lock
generated
|
@ -822,6 +822,16 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fslock"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b14c83e47c73f7d62d907ae24a1a98e9132df3c33eb6c54fcf4bce0dbc41d5af"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"winapi 0.3.9",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fuchsia-zircon"
|
name = "fuchsia-zircon"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
|
@ -2059,12 +2069,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rusty_v8"
|
name = "rusty_v8"
|
||||||
version = "0.14.0"
|
version = "0.15.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6bdaa4aeeae3253c3b34486af66527d9982105d79ba57cf9b50b217e7b47a8b6"
|
checksum = "901a9566b56ddfd49c504fdce35f27d8a6b29088facfd480ab79e95de3f836a1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cargo_gn",
|
"cargo_gn",
|
||||||
|
"fslock",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"which",
|
"which",
|
||||||
|
|
|
@ -19,7 +19,7 @@ indexmap = "1.6.0"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
libc = "0.2.77"
|
libc = "0.2.77"
|
||||||
log = "0.4.11"
|
log = "0.4.11"
|
||||||
rusty_v8 = "0.14.0"
|
rusty_v8 = "0.15.0"
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
smallvec = "1.4.2"
|
smallvec = "1.4.2"
|
||||||
|
|
|
@ -604,18 +604,13 @@ pub(crate) fn exception_to_err_result<'s, T>(
|
||||||
exception: v8::Local<v8::Value>,
|
exception: v8::Local<v8::Value>,
|
||||||
in_promise: bool,
|
in_promise: bool,
|
||||||
) -> Result<T, AnyError> {
|
) -> Result<T, AnyError> {
|
||||||
// TODO(piscisaureus): in rusty_v8, `is_execution_terminating()` should
|
let is_terminating_exception = scope.is_execution_terminating();
|
||||||
// also be implemented on `struct Isolate`.
|
|
||||||
let is_terminating_exception =
|
|
||||||
scope.thread_safe_handle().is_execution_terminating();
|
|
||||||
let mut exception = exception;
|
let mut exception = exception;
|
||||||
|
|
||||||
if is_terminating_exception {
|
if is_terminating_exception {
|
||||||
// TerminateExecution was called. Cancel exception termination so that the
|
// TerminateExecution was called. Cancel exception termination so that the
|
||||||
// exception can be created..
|
// exception can be created..
|
||||||
// TODO(piscisaureus): in rusty_v8, `cancel_terminate_execution()` should
|
scope.cancel_terminate_execution();
|
||||||
// also be implemented on `struct Isolate`.
|
|
||||||
scope.thread_safe_handle().cancel_terminate_execution();
|
|
||||||
|
|
||||||
// Maybe make a new exception object.
|
// Maybe make a new exception object.
|
||||||
if exception.is_null_or_undefined() {
|
if exception.is_null_or_undefined() {
|
||||||
|
@ -638,9 +633,7 @@ pub(crate) fn exception_to_err_result<'s, T>(
|
||||||
|
|
||||||
if is_terminating_exception {
|
if is_terminating_exception {
|
||||||
// Re-enable exception termination.
|
// Re-enable exception termination.
|
||||||
// TODO(piscisaureus): in rusty_v8, `terminate_execution()` should also
|
scope.terminate_execution();
|
||||||
// be implemented on `struct Isolate`.
|
|
||||||
scope.thread_safe_handle().terminate_execution();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(js_error)
|
Err(js_error)
|
||||||
|
@ -1785,12 +1778,7 @@ pub mod tests {
|
||||||
|
|
||||||
// Cancel the execution-terminating exception in order to allow script
|
// Cancel the execution-terminating exception in order to allow script
|
||||||
// execution again.
|
// execution again.
|
||||||
// TODO(piscisaureus): in rusty_v8, `cancel_terminate_execution()` should
|
let ok = isolate.v8_isolate().cancel_terminate_execution();
|
||||||
// also be implemented on `struct Isolate`.
|
|
||||||
let ok = isolate
|
|
||||||
.v8_isolate()
|
|
||||||
.thread_safe_handle()
|
|
||||||
.cancel_terminate_execution();
|
|
||||||
assert!(ok);
|
assert!(ok);
|
||||||
|
|
||||||
// Verify that the isolate usable again.
|
// Verify that the isolate usable again.
|
||||||
|
|
Loading…
Reference in a new issue