Bug 1500468 - Return not supported error as a stop-gap solution for Linux enumerate devices. r=kinetik
authorAlex Chronopoulos <achronop@gmail.com>
Fri, 19 Oct 2018 22:01:00 +0000
changeset 500736 08ca28f32dcd7c69277a8f0d393f6f435860eae4
parent 500735 abbf8a8eed9da1931dbbcdf71810d21ccd3ef333
child 500737 a2df0d50925f188b41fdc60328b058b4afb53a41
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1500468
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1500468 - Return not supported error as a stop-gap solution for Linux enumerate devices. r=kinetik Differential Revision: https://phabricator.services.mozilla.com/D9264
media/audioipc/client/src/context.rs
media/audioipc/register-collection-not-supported.patch
media/audioipc/update.sh
--- a/media/audioipc/client/src/context.rs
+++ b/media/audioipc/client/src/context.rs
@@ -265,17 +265,17 @@ impl ContextOps for ClientContext {
 
     fn register_device_collection_changed(
         &mut self,
         _dev_type: DeviceType,
         _collection_changed_callback: ffi::cubeb_device_collection_changed_callback,
         _user_ptr: *mut c_void,
     ) -> Result<()> {
         assert_not_in_callback();
-        Ok(())
+        Err(Error::not_supported())
     }
 }
 
 impl Drop for ClientContext {
     fn drop(&mut self) {
         debug!("ClientContext dropped...");
         let _ = send_recv!(self.rpc(), ClientDisconnect => ClientDisconnected);
         unsafe {
new file mode 100644
--- /dev/null
+++ b/media/audioipc/register-collection-not-supported.patch
@@ -0,0 +1,22 @@
+diff --git a/media/audioipc/client/src/context.rs b/media/audioipc/client/src/context.rs
+--- a/media/audioipc/client/src/context.rs
++++ b/media/audioipc/client/src/context.rs
+@@ -265,17 +265,17 @@ impl ContextOps for ClientContext {
+ 
+     fn register_device_collection_changed(
+         &mut self,
+         _dev_type: DeviceType,
+         _collection_changed_callback: ffi::cubeb_device_collection_changed_callback,
+         _user_ptr: *mut c_void,
+     ) -> Result<()> {
+         assert_not_in_callback();
+-        Ok(())
++        Err(Error::not_supported())
+     }
+ }
+ 
+ impl Drop for ClientContext {
+     fn drop(&mut self) {
+         debug!("ClientContext dropped...");
+         let _ = send_recv!(self.rpc(), ClientDisconnect => ClientDisconnected);
+         unsafe {
--- a/media/audioipc/update.sh
+++ b/media/audioipc/update.sh
@@ -26,8 +26,11 @@ if [ -n "$rev" ]; then
   sed -i.bak -e "/The git commit ID used was/ s/[0-9a-f]\{40\}\(-dirty\)\{0,1\} .\{1,100\}/$version ($date)/" README_MOZILLA
   rm README_MOZILLA.bak
 else
   echo "Remember to update README_MOZILLA with the version details."
 fi
 
 echo "Applying gecko.patch on top of $rev"
 patch -p3 < gecko.patch
+
+echo "Applying register-collection-not-supported.patch on top of $rev"
+patch -p3 < register-collection-not-supported.patch