Bug 1725749 - Update audioipc to fce878ff. r=chunmin

Differential Revision: https://phabricator.services.mozilla.com/D125165
This commit is contained in:
Matthew Gregan 2021-09-11 22:34:31 +00:00
parent 223d5b8e6b
commit a9d460a1c4
8 changed files with 27 additions and 19 deletions

View File

@ -35,7 +35,7 @@ rev = "4ee3b283182926f9a8bb31d603219ff2db70d2fd"
[source."https://github.com/mozilla/audioipc-2"]
git = "https://github.com/mozilla/audioipc-2"
replace-with = "vendored-sources"
rev = "8bb1a227fbaa5677458bcd876162b65307df38c2"
rev = "fce878ff15f4e1dba1e5b54f82460af605fb4d14"
[source."https://github.com/mozilla/application-services"]
git = "https://github.com/mozilla/application-services"

6
Cargo.lock generated
View File

@ -175,7 +175,7 @@ dependencies = [
[[package]]
name = "audioipc"
version = "0.2.5"
source = "git+https://github.com/mozilla/audioipc-2?rev=8bb1a227fbaa5677458bcd876162b65307df38c2#8bb1a227fbaa5677458bcd876162b65307df38c2"
source = "git+https://github.com/mozilla/audioipc-2?rev=fce878ff15f4e1dba1e5b54f82460af605fb4d14#fce878ff15f4e1dba1e5b54f82460af605fb4d14"
dependencies = [
"ashmem",
"audio_thread_priority",
@ -204,7 +204,7 @@ dependencies = [
[[package]]
name = "audioipc-client"
version = "0.4.0"
source = "git+https://github.com/mozilla/audioipc-2?rev=8bb1a227fbaa5677458bcd876162b65307df38c2#8bb1a227fbaa5677458bcd876162b65307df38c2"
source = "git+https://github.com/mozilla/audioipc-2?rev=fce878ff15f4e1dba1e5b54f82460af605fb4d14#fce878ff15f4e1dba1e5b54f82460af605fb4d14"
dependencies = [
"audio_thread_priority",
"audioipc",
@ -218,7 +218,7 @@ dependencies = [
[[package]]
name = "audioipc-server"
version = "0.2.3"
source = "git+https://github.com/mozilla/audioipc-2?rev=8bb1a227fbaa5677458bcd876162b65307df38c2#8bb1a227fbaa5677458bcd876162b65307df38c2"
source = "git+https://github.com/mozilla/audioipc-2?rev=fce878ff15f4e1dba1e5b54f82460af605fb4d14#fce878ff15f4e1dba1e5b54f82460af605fb4d14"
dependencies = [
"audio_thread_priority",
"audioipc",

View File

@ -1 +1 @@
{"files":{"Cargo.toml":"6329179497fb654bec0dea9f3642056309de3fa37d4042a48d18224e7b4742d3","cbindgen.toml":"bd89c5a9f52395b1c703ff04d1c0019dc3c92b691d571ae503c4b85753a44a39","src/lib.rs":"5da72fb551ea8a15df71e9d9e260e20d5c9571194b5d523bc39b257b2393f60f","src/server.rs":"045e54a1a015c75f9fa6c26ed426d227cfa653c4d851c16c862b9ccd57829393"},"package":null}
{"files":{"Cargo.toml":"6329179497fb654bec0dea9f3642056309de3fa37d4042a48d18224e7b4742d3","cbindgen.toml":"bd89c5a9f52395b1c703ff04d1c0019dc3c92b691d571ae503c4b85753a44a39","src/lib.rs":"5da72fb551ea8a15df71e9d9e260e20d5c9571194b5d523bc39b257b2393f60f","src/server.rs":"c7495bc5299dd55da3f3e9254e2e872cdbd01ee2523adde71898f9102a596cf0"},"package":null}

View File

@ -759,7 +759,14 @@ impl CubebServer {
let user_ptr = server_stream.cbs.as_ref() as *const ServerStreamCallbacks as *mut c_void;
// SharedMem setup message should've been processed by client by now.
server_stream.shm_setup.take().wait().unwrap();
if let Err(e) = server_stream.shm_setup.take().wait() {
// If the client errored before responding, log error and fail stream init.
debug!(
"Shmem setup for stream {:?} failed (error {:?})",
stm_tok, e
);
return Err(e.into());
}
let stream = unsafe {
let stream = context.stream_init(

View File

@ -1 +1 @@
{"files":{"Cargo.toml":"0e545bf799077eecc9dba7fbed69119a69e096da102e189c21ef9719b8114498","build.rs":"3f061cf9a989f63a71c693a543d26f7003e8b643c39c23ea555110252a2c39d2","src/async_msg.rs":"27c5c8215bcbe1364947065ac78198bcd4be7fbae0f5e49ea776cb454c5a6d2c","src/cmsg.rs":"97d8fe99ef94f75db9ed26cb4cf6faf9fbbc913cfa4152a8774ff4e76aead620","src/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/codec.rs":"df5be3cb4058fc1ddb34af0281ac2f416474d5ba0e4d71dd48914666025d95ae","src/core.rs":"721de353d3b0b5126bf5b25cfb1f99244702309ce9f9f24cc2ce3c5858228794","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/framing.rs":"45122f0bc44458d8e111466437e784f0d17035309cb5f03d45a5861082168ea1","src/lib.rs":"717151468773630600530a16d6c89ba559e321551e95e0f3d83721474ec82ae6","src/messages.rs":"ea118af0c8f6ea37efa4b07b57a99328fd3f4d85b67e86d6e374ae68ca805635","src/messagestream_unix.rs":"786ea7d2d2993c21987d34c0617abd78dbaa57079de68ea3ebbf5611a052f60b","src/messagestream_win.rs":"f5b2a0e22f56a14af24a76a4c13a1d6b066fbea347132a5413bee0bd2b757753","src/msg.rs":"f5353e942f7818742190541e568685d6b4d6200b55bfc60e46ee3db05f802436","src/rpc/client/mod.rs":"04e80b689548e7888b34441a7224dfa8cf557b8b4164754daee95a95b76f9aee","src/rpc/client/proxy.rs":"8d9c9b38ecec4ab5ee3b6e4c2d7aea9dbb4f7cf5c25d39a5db0c76aa41008497","src/rpc/driver.rs":"dea4efc844485e98c21f766772422e3a5c9ac153ade32c0ff51287516a05690b","src/rpc/mod.rs":"3b14af0be2b4c7b30a0dab9cca353e092652a16e29002f5aeba24dca45e33d1e","src/rpc/server.rs":"7caf0b2d659783b4c5c9dd9efe4cb9a2e7d5955c0dfda3d2e79581116bb9334b","src/shm.rs":"94dee9454acfb4541b7757fd6763b8ecfe1961bb0da780caf463dc6509ba1d98","src/tokio_named_pipes.rs":"c0d74ab6330ebdec53db12f0f532b60897c37e70345c368f10165d9b31409643","src/tokio_uds_stream.rs":"3251b91e4129f174a588648ec43575b35e139b67d4b8833fe324e82e67d5c3da"},"package":null}
{"files":{"Cargo.toml":"0b9a3ce0f238c34e8d12eb867010ed5948f138d9a9b8a1be6812ac433335eea5","build.rs":"3f061cf9a989f63a71c693a543d26f7003e8b643c39c23ea555110252a2c39d2","src/async_msg.rs":"27c5c8215bcbe1364947065ac78198bcd4be7fbae0f5e49ea776cb454c5a6d2c","src/cmsg.rs":"97d8fe99ef94f75db9ed26cb4cf6faf9fbbc913cfa4152a8774ff4e76aead620","src/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/codec.rs":"2e0a05968e07617adc6be0cbf04962c952c621e118f0db308eeeed5ccea4dfce","src/core.rs":"721de353d3b0b5126bf5b25cfb1f99244702309ce9f9f24cc2ce3c5858228794","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/framing.rs":"45122f0bc44458d8e111466437e784f0d17035309cb5f03d45a5861082168ea1","src/lib.rs":"717151468773630600530a16d6c89ba559e321551e95e0f3d83721474ec82ae6","src/messages.rs":"ea118af0c8f6ea37efa4b07b57a99328fd3f4d85b67e86d6e374ae68ca805635","src/messagestream_unix.rs":"786ea7d2d2993c21987d34c0617abd78dbaa57079de68ea3ebbf5611a052f60b","src/messagestream_win.rs":"f5b2a0e22f56a14af24a76a4c13a1d6b066fbea347132a5413bee0bd2b757753","src/msg.rs":"f5353e942f7818742190541e568685d6b4d6200b55bfc60e46ee3db05f802436","src/rpc/client/mod.rs":"04e80b689548e7888b34441a7224dfa8cf557b8b4164754daee95a95b76f9aee","src/rpc/client/proxy.rs":"8d9c9b38ecec4ab5ee3b6e4c2d7aea9dbb4f7cf5c25d39a5db0c76aa41008497","src/rpc/driver.rs":"dea4efc844485e98c21f766772422e3a5c9ac153ade32c0ff51287516a05690b","src/rpc/mod.rs":"3b14af0be2b4c7b30a0dab9cca353e092652a16e29002f5aeba24dca45e33d1e","src/rpc/server.rs":"7caf0b2d659783b4c5c9dd9efe4cb9a2e7d5955c0dfda3d2e79581116bb9334b","src/shm.rs":"94dee9454acfb4541b7757fd6763b8ecfe1961bb0da780caf463dc6509ba1d98","src/tokio_named_pipes.rs":"c0d74ab6330ebdec53db12f0f532b60897c37e70345c368f10165d9b31409643","src/tokio_uds_stream.rs":"3251b91e4129f174a588648ec43575b35e139b67d4b8833fe324e82e67d5c3da"},"package":null}

View File

@ -10,7 +10,7 @@ description = "Remote Cubeb IPC"
edition = "2018"
[dependencies]
bincode = "1"
bincode = "1.3"
bytes = "0.4"
cubeb = "0.9"
futures = "0.1.29"

View File

@ -5,7 +5,7 @@
//! `Encoder`s and `Decoder`s from items to/from `BytesMut` buffers.
use bincode::{self, deserialize, serialized_size};
use bincode::{self, Options};
use bytes::{BufMut, ByteOrder, BytesMut, LittleEndian};
use serde::de::DeserializeOwned;
use serde::ser::Serialize;
@ -104,10 +104,12 @@ impl<In, Out> LengthDelimitedCodec<In, Out> {
let buf = buf.split_to(n).freeze();
trace!("Attempting to decode");
let msg = deserialize::<Out>(buf.as_ref()).map_err(|e| match *e {
bincode::ErrorKind::Io(e) => e,
_ => io::Error::new(io::ErrorKind::Other, *e),
})?;
let msg = bincode::options()
.deserialize::<Out>(buf.as_ref())
.map_err(|e| match *e {
bincode::ErrorKind::Io(e) => e,
_ => io::Error::new(io::ErrorKind::Other, *e),
})?;
trace!("... Decoded {:?}", msg);
Ok(Some(msg))
@ -157,7 +159,7 @@ where
fn encode(&mut self, item: Self::In, buf: &mut BytesMut) -> io::Result<()> {
trace!("Attempting to encode");
let encoded_len = serialized_size(&item).unwrap();
let encoded_len = bincode::options().serialized_size(&item).unwrap();
if encoded_len > MAX_MESSAGE_LEN {
trace!("oversized message {}", encoded_len);
return Err(io::Error::new(
@ -170,9 +172,8 @@ where
buf.put_u32_le(encoded_len as u32);
#[allow(deprecated)]
if let Err(e) = bincode::config()
.limit(encoded_len)
if let Err(e) = bincode::options()
.with_limit(encoded_len)
.serialize_into::<_, Self::In>(&mut buf.writer(), &item)
{
match *e {

View File

@ -23,8 +23,8 @@ cubeb-coreaudio = { git = "https://github.com/mozilla/cubeb-coreaudio-rs", rev =
cubeb-pulse = { git = "https://github.com/mozilla/cubeb-pulse-rs", rev="3ad5978575f501ab10b1753626f176f1bba3f584", optional = true, features=["pulse-dlopen"] }
cubeb-sys = { version = "0.9", optional = true, features=["gecko-in-tree"] }
encoding_glue = { path = "../../../../intl/encoding_glue" }
audioipc-client = { git = "https://github.com/mozilla/audioipc-2", rev = "8bb1a227fbaa5677458bcd876162b65307df38c2", optional = true }
audioipc-server = { git = "https://github.com/mozilla/audioipc-2", rev = "8bb1a227fbaa5677458bcd876162b65307df38c2", optional = true }
audioipc-client = { git = "https://github.com/mozilla/audioipc-2", rev = "fce878ff15f4e1dba1e5b54f82460af605fb4d14", optional = true }
audioipc-server = { git = "https://github.com/mozilla/audioipc-2", rev = "fce878ff15f4e1dba1e5b54f82460af605fb4d14", optional = true }
authenticator = "0.3.1"
gkrust_utils = { path = "../../../../xpcom/rust/gkrust_utils" }
gecko_logger = { path = "../../../../xpcom/rust/gecko_logger" }