diff options
| author | 2018-11-17 13:10:40 +0000 | |
|---|---|---|
| committer | 2018-11-17 13:10:40 +0000 | |
| commit | ec43a01e0ac948c59d5b1f9c3812f2901b48942a (patch) | |
| tree | 57e1a23dcc0beba8e98841b8cf063f6153b08c9b /runtime/stack.h | |
| parent | 3d477f3a3eea757a49ca621cc579f711f22fccdd (diff) | |
Revert "Revert^2 "ART: Add StackVisitor accepting a lambda""
This reverts commit 3d477f3a3eea757a49ca621cc579f711f22fccdd.
Bug: 115837065
Reason for revert: Breaks jdwp tests.
Change-Id: I09249331798970751a20c6b41675c3efef72adfb
Diffstat (limited to 'runtime/stack.h')
| -rw-r--r-- | runtime/stack.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/runtime/stack.h b/runtime/stack.h index 9d30115bb1..02578d25b7 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -143,36 +143,6 @@ class StackVisitor { template <CountTransitions kCount = CountTransitions::kYes> void WalkStack(bool include_transitions = false) REQUIRES_SHARED(Locks::mutator_lock_); - // Convenience helper function to walk the stack with a lambda as a visitor. - template <CountTransitions kCountTransitions = CountTransitions::kYes, - typename T> - ALWAYS_INLINE static void WalkStack(const T& fn, - Thread* thread, - Context* context, - StackWalkKind walk_kind, - bool check_suspended = true, - bool include_transitions = false) - REQUIRES_SHARED(Locks::mutator_lock_) { - class LambdaStackVisitor : public StackVisitor { - public: - LambdaStackVisitor(const T& fn, - Thread* thread, - Context* context, - StackWalkKind walk_kind, - bool check_suspended = true) - : StackVisitor(thread, context, walk_kind, check_suspended), fn_(fn) {} - - bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) { - return fn_(this); - } - - private: - T fn_; - }; - LambdaStackVisitor visitor(fn, thread, context, walk_kind, check_suspended); - visitor.template WalkStack<kCountTransitions>(include_transitions); - } - Thread* GetThread() const { return thread_; } |