summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-09-03 17:41:50 -0700
committerElliott Hughes <enh@google.com>2013-09-03 22:26:57 -0700
commita4684052dbe58d36e32d1035c10bae2e2d52a8dd (patch)
tree17ddd4f3b10a76c8eab33a68c59d2e2574c8e74f /runtime
parent22955837e20f126845ff0e516dfa6f74ec81d240 (diff)
downloadart-a4684052dbe58d36e32d1035c10bae2e2d52a8dd.zip
art-a4684052dbe58d36e32d1035c10bae2e2d52a8dd.tar.gz
art-a4684052dbe58d36e32d1035c10bae2e2d52a8dd.tar.bz2
[build fix] Remove redundant complexity from JNI aborts.
(cherry picked from commit 8e4d3ed463df1a9f5fdc1e927a6afe6d208558e1) Change-Id: I375f27efbec35a7d21070b3a5699ab798143a6a2
Diffstat (limited to 'runtime')
-rw-r--r--runtime/check_jni.cc17
1 files changed, 2 insertions, 15 deletions
diff --git a/runtime/check_jni.cc b/runtime/check_jni.cc
index 6a7ceee..54f3143 100644
--- a/runtime/check_jni.cc
+++ b/runtime/check_jni.cc
@@ -35,10 +35,6 @@
#include "scoped_thread_state_change.h"
#include "thread.h"
-#define LIBCORE_CPP_JNI_HELPERS
-#include <JNIHelp.h> // from libcore
-#undef LIBCORE_CPP_JNI_HELPERS
-
namespace art {
static void JniAbort(const char* jni_function_name, const char* msg) {
@@ -814,17 +810,8 @@ class ScopedCheck {
ThrowLocation throw_location;
mirror::Throwable* exception = self->GetException(&throw_location);
std::string type(PrettyTypeOf(exception));
- // TODO: write native code that doesn't require allocation for dumping an exception.
- // TODO: do we care any more? art always dumps pending exceptions on aborting threads.
- bool with_stack_trace = (type != "java.lang.OutOfMemoryError");
- if (with_stack_trace) {
- JniAbortF(function_name_, "JNI %s called with pending exception '%s' thrown in %s\n%s",
- function_name_, type.c_str(), throw_location.Dump().c_str(),
- jniGetStackTrace(soa_.Env()).c_str());
- } else {
- JniAbortF(function_name_, "JNI %s called with pending exception '%s' thrown in %s",
- function_name_, type.c_str(), throw_location.Dump().c_str());
- }
+ JniAbortF(function_name_, "JNI %s called with pending exception '%s' thrown in %s",
+ function_name_, type.c_str(), throw_location.Dump().c_str());
return;
}
}