From: Mathieu Chartier Date: Mon, 12 Jan 2015 22:24:14 +0000 (-0800) Subject: Fix error in JobjectComparator X-Git-Tag: android-x86-7.1-r1~889^2~2235^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3096bc5d80a609c5e1c80ce64eeb6f3299ee4012;p=android-x86%2Fart.git Fix error in JobjectComparator Was comparing class hash code vs object hash code. Change-Id: I6427809876462100249809b6f9c5e996c0741cf1 --- diff --git a/runtime/jobject_comparator.cc b/runtime/jobject_comparator.cc index e22d75f94..77f93ffa7 100644 --- a/runtime/jobject_comparator.cc +++ b/runtime/jobject_comparator.cc @@ -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();