1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00

chore: upgrade rusty_v8 to 0.55.0 (#16604)

<!--
Before submitting a PR, please read http://deno.land/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
-->
This commit is contained in:
Bartek Iwańczuk 2022-11-12 05:37:37 +01:00 committed by GitHub
parent d81065cff9
commit b88b7c9244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 13 deletions

4
Cargo.lock generated
View file

@ -5421,9 +5421,9 @@ dependencies = [
[[package]]
name = "v8"
version = "0.54.0"
version = "0.55.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b63103bd7caa4c3571e8baafe58f3e04818df70505304ed814737e655d1d8d6"
checksum = "46cd4f562bce7520fbb511850c5488366264caf346be221cf7e908f51ac33dbc"
dependencies = [
"bitflags",
"fslock",

View file

@ -1260,10 +1260,11 @@ 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 {
fn napi_detach_arraybuffer(env: *mut Env, value: napi_value) -> Result {
let env: &mut Env = env.as_mut().ok_or(Error::InvalidArg)?;
let value = transmute::<napi_value, v8::Local<v8::Value>>(value);
let ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap();
ab.detach();
ab.detach(v8::undefined(&mut env.scope()).into());
Ok(())
}

View file

@ -35,7 +35,7 @@ serde_v8 = { version = "0.69.0", path = "../serde_v8" }
smallvec = "1.8"
sourcemap = "6.1"
url = { version = "2.3.1", features = ["serde", "expose_internals"] }
v8 = { version = "0.54.0", default-features = false }
v8 = { version = "0.55.0", default-features = false }
[[example]]
name = "http_bench_json_ops"

View file

@ -472,7 +472,7 @@ fn op_serialize(
}
let backing_store = buf.get_backing_store();
buf.detach();
buf.detach(v8::undefined(scope).into());
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();

View file

@ -197,14 +197,10 @@ fn v8_init(
v8::icu::set_common_data_71(&ICU_DATA.0).unwrap();
let flags = concat!(
" --experimental-wasm-threads",
" --wasm-test-streaming",
" --harmony-import-assertions",
" --no-validate-asm",
" --turbo_fast_api_calls",
// This flag prevents "unresolved external reference" panic during
// build, which started happening in V8 10.6
" --noexperimental-async-stack-tagging-api",
" --harmony-change-array-by-copy",
);

View file

@ -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();
ab.detach(v8::undefined(scope).into());
let ab = v8::ArrayBuffer::with_backing_store(scope, &bs);
Ok(serde_v8::Value {
v8_value: ab.into(),

View file

@ -18,7 +18,7 @@ derive_more = "0.99.17"
serde = { version = "1.0.136", features = ["derive"] }
serde_bytes = "0.11"
smallvec = { version = "1.8", features = ["union"] }
v8 = { version = "0.54.0", default-features = false }
v8 = { version = "0.55.0", default-features = false }
[dev-dependencies]
bencher = "0.1"

View file

@ -63,7 +63,7 @@ impl FromV8 for DetachedBuffer {
return Err(crate::Error::ExpectedDetachable);
}
let store = b.get_backing_store();
b.detach(); // Detach
b.detach(v8::undefined(scope).into()); // Detach
Ok(Self(V8Slice { store, range }))
}
}