summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-11-30 23:20:18 +0100
committerGitHub <noreply@github.com>2022-11-30 22:20:18 +0000
commit381932ce1e79f38bbf8bdf28b4e808038aead7a7 (patch)
treeb58cf243660a1a728178253f39d6357c549ddd95
parent623dbe7a5786a5aa600b14a7e13e26777313d844 (diff)
chore: upgrade rusty_v8 to 0.58.0 (#16879)
-rw-r--r--Cargo.lock4
-rw-r--r--Cargo.toml2
-rw-r--r--cli/napi/js_native_api.rs5
-rw-r--r--core/ops_builtin_v8.rs2
-rw-r--r--ext/web/lib.rs2
-rw-r--r--serde_v8/magic/detached_buffer.rs2
6 files changed, 8 insertions, 9 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 809dbd3fb..0ee45a9f2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5388,9 +5388,9 @@ dependencies = [
[[package]]
name = "v8"
-version = "0.57.0"
+version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "293cb302608e408948274638627411722c394926a975923a5ca2ec573ed7132e"
+checksum = "8e9b88668afedf6ec9f8f6d30b446f622498da2ef0b3991a52e10f0ea8c6cc09"
dependencies = [
"bitflags",
"fslock",
diff --git a/Cargo.toml b/Cargo.toml
index 831f1b960..2bd754d47 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,7 +40,7 @@ license = "MIT"
repository = "https://github.com/denoland/deno"
[workspace.dependencies]
-v8 = { version = "0.57.0", default-features = false }
+v8 = { version = "0.58.0", default-features = false }
deno_ast = { version = "0.21.0", features = ["transpiling"] }
deno_core = { version = "0.161.0", path = "./core" }
diff --git a/cli/napi/js_native_api.rs b/cli/napi/js_native_api.rs
index a0605af11..a4726fd39 100644
--- a/cli/napi/js_native_api.rs
+++ b/cli/napi/js_native_api.rs
@@ -1260,11 +1260,10 @@ fn napi_delete_reference(env: *mut Env, _nref: napi_ref) -> Result {
}
#[napi_sym::napi_sym]
-fn napi_detach_arraybuffer(env: *mut Env, value: napi_value) -> Result {
- let env: &mut Env = env.as_mut().ok_or(Error::InvalidArg)?;
+fn napi_detach_arraybuffer(_env: *mut Env, value: napi_value) -> Result {
let value = transmute::<napi_value, v8::Local<v8::Value>>(value);
let ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap();
- ab.detach(v8::undefined(&mut env.scope()).into());
+ ab.detach(None);
Ok(())
}
diff --git a/core/ops_builtin_v8.rs b/core/ops_builtin_v8.rs
index c72e114bd..cfbb3eba4 100644
--- a/core/ops_builtin_v8.rs
+++ b/core/ops_builtin_v8.rs
@@ -472,7 +472,7 @@ fn op_serialize(
}
let backing_store = buf.get_backing_store();
- buf.detach(v8::undefined(scope).into());
+ buf.detach(None);
let id = shared_array_buffer_store.insert(backing_store);
value_serializer.transfer_array_buffer(id, buf);
let id = v8::Number::new(scope, id as f64).into();
diff --git a/ext/web/lib.rs b/ext/web/lib.rs
index 85fae2c64..cfbcee6e3 100644
--- a/ext/web/lib.rs
+++ b/ext/web/lib.rs
@@ -383,7 +383,7 @@ fn op_transfer_arraybuffer<'a>(
return Err(type_error("ArrayBuffer is not detachable"));
}
let bs = ab.get_backing_store();
- ab.detach(v8::undefined(scope).into());
+ ab.detach(None);
let ab = v8::ArrayBuffer::with_backing_store(scope, &bs);
Ok(serde_v8::Value {
v8_value: ab.into(),
diff --git a/serde_v8/magic/detached_buffer.rs b/serde_v8/magic/detached_buffer.rs
index 78232cbe7..cbe8b39c3 100644
--- a/serde_v8/magic/detached_buffer.rs
+++ b/serde_v8/magic/detached_buffer.rs
@@ -63,7 +63,7 @@ impl FromV8 for DetachedBuffer {
return Err(crate::Error::ExpectedDetachable);
}
let store = b.get_backing_store();
- b.detach(v8::undefined(scope).into()); // Detach
+ b.detach(None); // Detach
Ok(Self(V8Slice { store, range }))
}
}