From 4e61d9703046fa2ea560c27a93b690b103831faf Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 15 Oct 2018 10:45:52 -0400 Subject: [PATCH] Report to logcat when android logging thread terminates unexpectedly. --- ports/libsimpleservo/src/jniapi.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/libsimpleservo/src/jniapi.rs b/ports/libsimpleservo/src/jniapi.rs index f4633429f11..efb67ff741e 100644 --- a/ports/libsimpleservo/src/jniapi.rs +++ b/ports/libsimpleservo/src/jniapi.rs @@ -483,7 +483,10 @@ fn redirect_stdout_to_logcat() { let end = if result == 0 { return; } else if result < 0 { - return; /* TODO: report problem */ + unsafe { + __android_log_write(3, tag, b"error in log thread; closing\0".as_ptr() as *const _); + } + return; } else { result as usize + cursor };