Skip to content

Commit

Permalink
chore: upgrade rusty_v8 to 0.58.0 (denoland#16879)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju authored Nov 30, 2022
1 parent 623dbe7 commit 381932c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
5 changes: 2 additions & 3 deletions cli/napi/js_native_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down
2 changes: 1 addition & 1 deletion core/ops_builtin_v8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion ext/web/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion serde_v8/magic/detached_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
}
}

0 comments on commit 381932c

Please sign in to comment.