diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-03-06 18:11:53 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-03-07 12:09:04 -0800 |
commit | c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b (patch) | |
tree | de6141864c1c011216c19dd99a2c1e2bc442dd6d /runtime/indirect_reference_table.cc | |
parent | a9d7be62735e3356cef7e8ed797c519134a17061 (diff) | |
download | art-c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b.zip art-c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b.tar.gz art-c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b.tar.bz2 |
Add more VerifyObject calls.
Added verify object calls to SirtRef, IndirectReferenceTable,
ReferenceTable.
Removed un-needed verify object in ScopedObjectAccess / DecodeJObject
since object sources are handled.
Bug: 12934910
Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
Diffstat (limited to 'runtime/indirect_reference_table.cc')
-rw-r--r-- | runtime/indirect_reference_table.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc index c8855e3..ed3fb5f 100644 --- a/runtime/indirect_reference_table.cc +++ b/runtime/indirect_reference_table.cc @@ -355,4 +355,13 @@ void IndirectReferenceTable::Dump(std::ostream& os) const { ReferenceTable::Dump(os, entries); } +mirror::Object* IndirectReferenceTable::Get(IndirectRef iref) const { + if (!GetChecked(iref)) { + return kInvalidIndirectRefObject; + } + mirror::Object* obj = table_[ExtractIndex(iref)];; + VerifyObject(obj); + return obj; +} + } // namespace art |