Add an unhandled-exception handler |
|||
Issue descriptionCurrently when an unhandled exception is raised from an implementation of a Mojo interface, it eventually bubbles up to the JNI wrappers, which eventually calls abort(). This is okay for applications, but in ARC we use Mojo in the system_server process, where one such call to abort() brings the whole container down. We currently have some patches to convert the calls to abort() into Android.wtf (which sends a crash report to http://crash, but does not actually cause a crash) under certain situations, but it would probably be better to solve this in a saner fashion upstream. So, something like an unhandled-exception handler would be extremely helpful to us. Of course, if no such handler is installed, the default behavior should still be used.
,
Jun 14 2018
,
Jun 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4256ecec730fdf5a41f34e11c0641e072971cb8c commit 4256ecec730fdf5a41f34e11c0641e072971cb8c Author: Luis Hector Chavez <lhchavez@google.com> Date: Mon Jun 18 20:14:56 2018 [mojo] Add a way to handle unhandled RuntimeExceptions This change makes it possible to allow interfaces to globally handle unhandled RuntimeExceptions, in their bindings or in the callbacks. delegate can now forward the unhandled exceptions to the crash server. Bug: 810087 Test: Android-on-Chrome OS has the same behavior as before Test: Android-on-Chrome OS, when setting the DefaultExceptionHandler's Change-Id: I2b7455a0344a109e1d2416a74ad4a0b98cd007f0 Reviewed-on: https://chromium-review.googlesource.com/1101898 Reviewed-by: Ken Rockot <rockot@chromium.org> Commit-Queue: Luis Hector Chavez <lhchavez@chromium.org> Cr-Commit-Position: refs/heads/master@{#568128} [modify] https://crrev.com/4256ecec730fdf5a41f34e11c0641e072971cb8c/mojo/public/java/BUILD.gn [modify] https://crrev.com/4256ecec730fdf5a41f34e11c0641e072971cb8c/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Connector.java [add] https://crrev.com/4256ecec730fdf5a41f34e11c0641e072971cb8c/mojo/public/java/bindings/src/org/chromium/mojo/bindings/ExceptionHandler.java
,
Jun 23 2018
,
Jul 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/14c2e075796d945d8345a3b4f641e912b5b2de0d commit 14c2e075796d945d8345a3b4f641e912b5b2de0d Author: Luis Hector Chavez <lhchavez@google.com> Date: Tue Jul 24 15:52:32 2018 Mojo: Use the unhandled exception handler for connection errors This change also lets the unhandled exception handler take a first attempt at handling errors that occur when handling connection errors. yo dawg! Bug: 810087 Test: Intentionally threw an exception from a connection error handler Change-Id: I432055b33443208a352d272c7f7fcb1dbeb2a43f Reviewed-on: https://chromium-review.googlesource.com/1147516 Reviewed-by: Ken Rockot <rockot@chromium.org> Commit-Queue: Luis Hector Chavez <lhchavez@chromium.org> Cr-Commit-Position: refs/heads/master@{#577562} [modify] https://crrev.com/14c2e075796d945d8345a3b4f641e912b5b2de0d/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Connector.java |
|||
►
Sign in to add a comment |
|||
Comment 1 by lhchavez@chromium.org
, Feb 7 2018Labels: OS-Android OS-Chrome