diff options
Diffstat (limited to 'runtime/indirect_reference_table.h')
-rw-r--r-- | runtime/indirect_reference_table.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h index 86b92cff2d..f877ce8ba7 100644 --- a/runtime/indirect_reference_table.h +++ b/runtime/indirect_reference_table.h @@ -285,6 +285,10 @@ class IndirectReferenceTable { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::alloc_tracker_lock_); + IndirectRefKind GetKind() const { + return kind_; + } + // Return the #of entries in the entire table. This includes holes, and // so may be larger than the actual number of "live" entries. size_t Capacity() const { @@ -331,6 +335,10 @@ class IndirectReferenceTable { return DecodeIndirectRefKind(reinterpret_cast<uintptr_t>(iref)); } + /* Reference validation for CheckJNI. */ + bool IsValidReference(IndirectRef, /*out*/std::string* error_msg) const + REQUIRES_SHARED(Locks::mutator_lock_); + private: static constexpr size_t kSerialBits = MinimumBitsToStore(kIRTPrevCount); static constexpr uint32_t kShiftedSerialMask = (1u << kSerialBits) - 1; @@ -391,7 +399,6 @@ class IndirectReferenceTable { static void AbortIfNoCheckJNI(const std::string& msg); /* extra debugging checks */ - bool GetChecked(IndirectRef) const REQUIRES_SHARED(Locks::mutator_lock_); bool CheckEntry(const char*, IndirectRef, uint32_t) const; /// semi-public - read/write by jni down calls. |