OSDN Git Service

Fix error in JobjectComparator
authorMathieu Chartier <mathieuc@google.com>
Mon, 12 Jan 2015 22:24:14 +0000 (14:24 -0800)
committerMathieu Chartier <mathieuc@google.com>
Mon, 12 Jan 2015 22:24:14 +0000 (14:24 -0800)
Was comparing class hash code vs object hash code.

Change-Id: I6427809876462100249809b6f9c5e996c0741cf1

runtime/jobject_comparator.cc

index e22d75f..77f93ff 100644 (file)
@@ -40,7 +40,7 @@ bool JobjectComparator::operator()(jobject jobj1, jobject jobj2) const {
   }
   // Sort by class...
   if (obj1->GetClass() != obj2->GetClass()) {
-    return obj1->GetClass()->IdentityHashCode() < obj2->IdentityHashCode();
+    return obj1->GetClass()->IdentityHashCode() < obj2->GetClass()->IdentityHashCode();
   } else {
     // ...then by size...
     size_t count1 = obj1->SizeOf();