OSDN Git Service

Don't dump stack when deleting an invalid local ref
authorMathieu Chartier <mathieuc@google.com>
Thu, 30 Jul 2015 18:41:04 +0000 (11:41 -0700)
committerMathieu Chartier <mathieuc@google.com>
Thu, 30 Jul 2015 21:37:48 +0000 (14:37 -0700)
Bug: 21724724

(cherry picked from commit 2ada67b3145d38b352297bdb9d0546f58882e208)

Change-Id: Ifa99df9ee9f3265038a0c0f7944e834e42c498d4

runtime/indirect_reference_table.cc

index 75fc84b..c9ba6cf 100644 (file)
@@ -28,6 +28,8 @@
 
 namespace art {
 
+static constexpr bool kDumpStackOnNonLocalReference = false;
+
 template<typename T>
 class MutatorLockedDumpable {
  public:
@@ -183,7 +185,9 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) {
       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;
     }