summaryrefslogtreecommitdiffstats
path: root/runtime/indirect_reference_table-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/indirect_reference_table-inl.h')
-rw-r--r--runtime/indirect_reference_table-inl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/indirect_reference_table-inl.h b/runtime/indirect_reference_table-inl.h
index 639be515f6..39d850fc4d 100644
--- a/runtime/indirect_reference_table-inl.h
+++ b/runtime/indirect_reference_table-inl.h
@@ -82,6 +82,15 @@ inline mirror::Object* IndirectReferenceTable::Get(IndirectRef iref) const {
return obj;
}
+inline void IndirectReferenceTable::Update(IndirectRef iref, mirror::Object* obj) {
+ if (!GetChecked(iref)) {
+ LOG(WARNING) << "IndirectReferenceTable Update failed to find reference " << iref;
+ return;
+ }
+ uint32_t idx = ExtractIndex(iref);
+ table_[idx].SetReference(obj);
+}
+
} // namespace art
#endif // ART_RUNTIME_INDIRECT_REFERENCE_TABLE_INL_H_