From 3068d582eff4552ff260d7966fcbdc93e17d0207 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 28 May 2019 16:39:29 +0100 Subject: Clean up creating handles from `this`. Make these member functions static and take an additional parameter `Handle<.> h_this`. Callers mostly already have a Handle<> to pass, so we avoid an extra StackHandleScope. This pattern was already used for some functions. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --interpreter Change-Id: I4f4478b0526bcb2f3c23305d3b3cc4a65fff9ff5 --- runtime/mirror/array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/mirror/array.h') diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index dbc5d2ac46..19f9a927e3 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -125,8 +125,8 @@ class MANAGED Array : public Object { template ALWAYS_INLINE bool CheckIsValidIndex(int32_t index) REQUIRES_SHARED(Locks::mutator_lock_); - ObjPtr CopyOf(Thread* self, int32_t new_length) REQUIRES_SHARED(Locks::mutator_lock_) - REQUIRES(!Roles::uninterruptible_); + static ObjPtr CopyOf(Handle h_this, Thread* self, int32_t new_length) + REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); protected: void ThrowArrayStoreException(ObjPtr object) REQUIRES_SHARED(Locks::mutator_lock_) -- cgit v1.2.3-59-g8ed1b