Don't dump stack when deleting an invalid local ref
Bug: 21724724
Change-Id: Ifa99df9ee9f3265038a0c0f7944e834e42c498d4
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
index 55632ba..d54c1a6 100644
--- a/runtime/indirect_reference_table.cc
+++ b/runtime/indirect_reference_table.cc
@@ -29,6 +29,8 @@
namespace art {
+static constexpr bool kDumpStackOnNonLocalReference = false;
+
template<typename T>
class MutatorLockedDumpable {
public:
@@ -184,7 +186,9 @@
if (env->check_jni) {
ScopedObjectAccess soa(self);
LOG(WARNING) << "Attempt to remove non-JNI local reference, dumping thread";
- self->Dump(LOG(WARNING));
+ if (kDumpStackOnNonLocalReference) {
+ self->Dump(LOG(WARNING));
+ }
}
return true;
}