mozilla / cubeb-coreaudio-rs

The audio backend of Firefox on Mac OS X.
ISC License
25 stars 10 forks source link

Replace `assert!` by `debug_assert!` for release build #38

Open ChunMinChang opened 4 years ago

ChunMinChang commented 4 years ago

Replacing assert! by debug_assert! for release build can prevent panic! from being called and cause a crash. We should figure out what assert! should be replaced.

ChunMinChang commented 4 years ago

Some of them are addressed in #39 and #40. Keep other assert! for now and see if they cause problems when this backend is shipped to Firefox Beta or Release.

ChunMinChang commented 4 years ago

The assert! here: https://github.com/ChunMinChang/cubeb-coreaudio-rs/blob/6e3e8e8359be7247f96495376f99073196449c3a/src/backend/mod.rs#L2210-L2211

can be replaced by debug_assert! to see if BMO 1083664 is still a problem.