diff options
author | 2019-11-26 18:52:06 +0000 | |
---|---|---|
committer | 2019-12-02 18:34:20 +0000 | |
commit | f1b809ce611e943f926fff97cefe0930226ffcc2 (patch) | |
tree | f75675383cf8018f9f333e608df35edbacf1c913 /libartbase/base/iteration_range.h | |
parent | 20b7a9b8aeaf76fc8f3248f211489fd00af73170 (diff) |
Revert^2 "Allow structural redefinition on non-final classes."
We were incorrectly racing with the rest of the runtime in a couple of
places. First we would return an ObjPtr of a newly defined class after
holding it over a suspend point. This could lead to DefineClass
returning an obsolete class in some cases.
We also failed to ensure the class-status was synchronized between the
old and new classes during structural redefinition. This could lead to
a class appearing to go backwards in status.
This reverts commit 88b1c83080afcb2bfb6f781ded1c90fe8f9eab4d.
Reason for revert: Fixed issues causing test failures.
Test: ./test.py --host
Bug: 134162467
Bug: 144168550
Change-Id: I4d0f7718490532f0ef14a9561b8e7000ef292b12
Diffstat (limited to 'libartbase/base/iteration_range.h')
-rw-r--r-- | libartbase/base/iteration_range.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libartbase/base/iteration_range.h b/libartbase/base/iteration_range.h index cd87d85f68..eaed8b06a8 100644 --- a/libartbase/base/iteration_range.h +++ b/libartbase/base/iteration_range.h @@ -49,6 +49,11 @@ inline IterationRange<Iter> MakeIterationRange(const Iter& begin_it, const Iter& return IterationRange<Iter>(begin_it, end_it); } +template<typename List> +inline IterationRange<typename List::iterator> MakeIterationRange(List& list) { + return IterationRange<typename List::iterator>(list.begin(), list.end()); +} + template <typename Iter> inline IterationRange<Iter> MakeEmptyIterationRange(const Iter& it) { return IterationRange<Iter>(it, it); |