diff options
| author | 2015-08-06 03:12:39 +0000 | |
|---|---|---|
| committer | 2015-08-06 03:12:39 +0000 | |
| commit | 1f3f766d3b365d01f36b85dc19d40f754fa48533 (patch) | |
| tree | fe08749dea3ca6cad97bce48416beb37203efdf5 /runtime/gc/heap.cc | |
| parent | 275bc5e5f318ba6ea1bad6c89c2924d1248b7523 (diff) | |
| parent | 54d220eb9cc51215d75b9e0fe921b94bebbb3fd6 (diff) | |
Merge "Move ArtFields and ArtMethods to be a length prefixed array"
Diffstat (limited to 'runtime/gc/heap.cc')
| -rw-r--r-- | runtime/gc/heap.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 5f617bd274..59e39df9ee 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -2912,14 +2912,10 @@ class VerifyReferenceCardVisitor { if (!obj->IsObjectArray()) { mirror::Class* klass = is_static ? obj->AsClass() : obj->GetClass(); CHECK(klass != nullptr); - auto* fields = is_static ? klass->GetSFields() : klass->GetIFields(); - auto num_fields = is_static ? klass->NumStaticFields() : klass->NumInstanceFields(); - CHECK_EQ(fields == nullptr, num_fields == 0u); - for (size_t i = 0; i < num_fields; ++i) { - ArtField* cur = &fields[i]; - if (cur->GetOffset().Int32Value() == offset.Int32Value()) { + for (ArtField& field : is_static ? klass->GetSFields() : klass->GetIFields()) { + if (field.GetOffset().Int32Value() == offset.Int32Value()) { LOG(ERROR) << (is_static ? "Static " : "") << "field in the live stack is " - << PrettyField(cur); + << PrettyField(&field); break; } } |