diff --git a/rust-toolchain b/rust-toolchain index 1f3cce88..1f3171c7 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.74.1 \ No newline at end of file +1.76.0 \ No newline at end of file diff --git a/src/rust/src/android/android_platform.rs b/src/rust/src/android/android_platform.rs index 1add6f83..9b92c2a3 100644 --- a/src/rust/src/android/android_platform.rs +++ b/src/rust/src/android/android_platform.rs @@ -2003,7 +2003,7 @@ impl sfu::Delegate for AndroidPlatform { // Set a frame capacity of min (5) + objects (5) + elements (N * 1 object per element). let capacity = (10 + joined_members.len()) as i32; - match env.with_local_frame_returning_local(capacity, |env| -> Result<_> { + let result = env.with_local_frame_returning_local(capacity, |env| -> Result<_> { let jni_peek_info = match self.make_peek_info_object( env, &peek_info, @@ -2020,7 +2020,8 @@ impl sfu::Delegate for AndroidPlatform { jni_peek_info => java.lang.Object, ) -> void); Ok(env.new_object(http_result_class, args.sig, &args.args)?) - }) { + }); + match result { Ok(v) if !v.is_null() => v, Ok(_) => { // Already logged, so just bail out early. diff --git a/src/rust/src/android/jni_util.rs b/src/rust/src/android/jni_util.rs index 193de5a6..0a8dfb81 100644 --- a/src/rust/src/android/jni_util.rs +++ b/src/rust/src/android/jni_util.rs @@ -291,7 +291,7 @@ pub struct ExceptionCheckingJNIEnv<'a>(JNIEnv<'a>); impl Drop for ExceptionCheckingJNIEnv<'_> { fn drop(&mut self) { - match try_scoped(|| { + let result = try_scoped(|| { let exception = self.exception_occurred()?; if exception.is_null() { return Ok(()); @@ -316,7 +316,8 @@ impl Drop for ExceptionCheckingJNIEnv<'_> { jni_args!((thread => java.lang.Thread, exception => java.lang.Throwable) -> void), )?; Ok(()) - }) { + }); + match result { Ok(()) => {} Err(e) => { error!("unable to rethrow exception: {e}"); diff --git a/src/rust/src/electron.rs b/src/rust/src/electron.rs index ba196be9..3099b586 100644 --- a/src/rust/src/electron.rs +++ b/src/rust/src/electron.rs @@ -397,13 +397,14 @@ impl CallEndpoint { // because otherwise a new event could come in *during* the processing. event_reported_for_callback.store(false, std::sync::atomic::Ordering::Relaxed); - match cx.try_catch(|cx| { + let result = cx.try_catch(|cx| { let observer = js_object.as_ref().to_inner(cx); let method_name = "processEvents"; let method = observer.get::(cx, method_name)?; method.call(cx, observer, [])?; Ok(()) - }) { + }); + match result { Ok(_) => {} Err(e) => { error!(