diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-08 10:26:16 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-09 09:09:11 -0700 |
commit | 3f5881fda3606b27e30bf903052c73b03910f90b (patch) | |
tree | 0c60e00a3923d47658e2d224997ab2742c113877 /runtime/indirect_reference_table.h | |
parent | 1576be32be4a99a1cffdaaf209a3cd67e8b2f88a (diff) | |
download | art-3f5881fda3606b27e30bf903052c73b03910f90b.zip art-3f5881fda3606b27e30bf903052c73b03910f90b.tar.gz art-3f5881fda3606b27e30bf903052c73b03910f90b.tar.bz2 |
ART: IRT refactor
IRT creation might fail. Add a path that allows to bypass the aborts
and instead signal validity. Hide this path with a private constructor,
rewrite users to use a static Create method.
Bug: 20110201
Change-Id: I440499c3372cd7557eb970b70ce2c4543da520e4
Diffstat (limited to 'runtime/indirect_reference_table.h')
-rw-r--r-- | runtime/indirect_reference_table.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h index 25b0281..0072184 100644 --- a/runtime/indirect_reference_table.h +++ b/runtime/indirect_reference_table.h @@ -258,10 +258,15 @@ bool inline operator!=(const IrtIterator& lhs, const IrtIterator& rhs) { class IndirectReferenceTable { public: - IndirectReferenceTable(size_t initialCount, size_t maxCount, IndirectRefKind kind); + // WARNING: When using with abort_on_error = false, the object may be in a partially + // initialized state. Use IsValid() to check. + IndirectReferenceTable(size_t initialCount, size_t maxCount, IndirectRefKind kind, + bool abort_on_error = true); ~IndirectReferenceTable(); + bool IsValid() const; + /* * Add a new entry. "obj" must be a valid non-NULL object reference. * |