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
diff --git a/runtime/mirror/object_array.h b/runtime/mirror/object_array.h
index f7046d1..7f43cd2 100644
--- a/runtime/mirror/object_array.h
+++ b/runtime/mirror/object_array.h
@@ -99,7 +99,9 @@
bool throw_exception)
REQUIRES_SHARED(Locks::mutator_lock_);
- ObjPtr<ObjectArray<T>> CopyOf(Thread* self, int32_t new_length)
+ static ObjPtr<ObjectArray<T>> CopyOf(Handle<ObjectArray<T>> h_this,
+ Thread* self,
+ int32_t new_length)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Roles::uninterruptible_);