[kotlin] Abort on unhandled callback exceptions When an uncaught exception occurs on a callback thread newly attached by JNI, forward it to the thread's custom or default UncaughtExceptionHandler when one is configured, and otherwise log the Java stack trace and abort natively instead of returning into Dawn's native worker loop. Unlike a terminating Java thread where Thread.dispatchUncaughtException() ignores exceptions thrown by the handler, also abort if looking up or invoking the handler throws a secondary exception so execution does not return into Dawn's native worker loop. Add subprocess abort tests in AsyncHelperTest (~7.0 s total across the 4 subprocess probes, ~1.7-1.8 s per probe on Pixel 9). Also verified manually in an Android app process with the stock RuntimeInit$KillApplicationHandler installed that an uncaught callback exception on DawnWorker logs "FATAL EXCEPTION: DawnWorker" in logcat, reports the crash via handleApplicationCrash (ApplicationExitInfo REASON_CRASH), and writes no native tombstone. Bug: 581261070 Test: ./gradlew :webgpu:connectedDebugAndroidTest Change-Id: I20786ca55ccb9c782ca09672d09edf4380703a86 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/353675 Commit-Queue: Tarun Saini <sainitarun@google.com> Reviewed-by: Nikita Gupta <nikigupta@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.