Index: base/android/java/src/org/chromium/base/ThrowUncaughtException.java |
diff --git a/base/android/java/src/org/chromium/base/ThrowUncaughtException.java b/base/android/java/src/org/chromium/base/ThrowUncaughtException.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f3f1f3e7450aaeb2eae540aada25b308da999783 |
--- /dev/null |
+++ b/base/android/java/src/org/chromium/base/ThrowUncaughtException.java |
@@ -0,0 +1,23 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.base; |
+ |
+import org.chromium.base.annotations.CalledByNative; |
+import org.chromium.base.annotations.MainDex; |
+import org.chromium.base.annotations.SuppressFBWarnings; |
+ |
+@MainDex |
+@SuppressFBWarnings("NM_CLASS_NOT_EXCEPTION") |
+abstract class ThrowUncaughtException { |
+ @CalledByNative |
+ private static void post() { |
+ ThreadUtils.postOnUiThread(new Runnable() { |
+ @Override |
+ public void run() { |
+ throw new RuntimeException("Intentional exception not caught by JNI"); |
+ } |
+ }); |
+ } |
+} |