diff options
author | 2018-06-04 09:14:42 +0000 | |
---|---|---|
committer | 2018-06-04 09:14:42 +0000 | |
commit | 9ddef18ae95859a985e7a0de7e22999fcbc28e07 (patch) | |
tree | ff38945fc61f1e32717a18b0a6901c5d11c33ccb /runtime/class_linker.h | |
parent | 0366f3251c3078a0161d178e3b0afd5efc4c84c0 (diff) | |
parent | bcf175247272d0e321c8d988c3c01c123b56e36e (diff) |
Merge "ObjPtr<>-ify array allocations."
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 32016fa12a..58ce6eb25c 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -163,7 +163,7 @@ class ClassLinker { } // Finds the array class given for the element class. - ObjPtr<mirror::Class> FindArrayClass(Thread* self, ObjPtr<mirror::Class>* element_class) + ObjPtr<mirror::Class> FindArrayClass(Thread* self, ObjPtr<mirror::Class> element_class) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_); @@ -451,7 +451,7 @@ class ClassLinker { LinearAlloc* allocator, size_t length); - mirror::PointerArray* AllocPointerArray(Thread* self, size_t length) + ObjPtr<mirror::PointerArray> AllocPointerArray(Thread* self, size_t length) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); @@ -459,8 +459,8 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); - mirror::ObjectArray<mirror::StackTraceElement>* AllocStackTraceElementArray(Thread* self, - size_t length) + ObjPtr<mirror::ObjectArray<mirror::StackTraceElement>> AllocStackTraceElementArray(Thread* self, + size_t length) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); @@ -543,8 +543,9 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_); template <ReadBarrierOption kReadBarrierOption = kWithReadBarrier> - mirror::ObjectArray<mirror::Class>* GetClassRoots() REQUIRES_SHARED(Locks::mutator_lock_) { - mirror::ObjectArray<mirror::Class>* class_roots = class_roots_.Read<kReadBarrierOption>(); + ObjPtr<mirror::ObjectArray<mirror::Class>> GetClassRoots() REQUIRES_SHARED(Locks::mutator_lock_) { + ObjPtr<mirror::ObjectArray<mirror::Class>> class_roots = + class_roots_.Read<kReadBarrierOption>(); DCHECK(class_roots != nullptr); return class_roots; } @@ -777,16 +778,16 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); - mirror::DexCache* AllocDexCache(ObjPtr<mirror::String>* out_location, - Thread* self, - const DexFile& dex_file) + ObjPtr<mirror::DexCache> AllocDexCache(/*out*/ ObjPtr<mirror::String>* out_location, + Thread* self, + const DexFile& dex_file) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); // Used for tests and AppendToBootClassPath. - mirror::DexCache* AllocAndInitializeDexCache(Thread* self, - const DexFile& dex_file, - LinearAlloc* linear_alloc) + ObjPtr<mirror::DexCache> AllocAndInitializeDexCache(Thread* self, + const DexFile& dex_file, + LinearAlloc* linear_alloc) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_) REQUIRES(!Roles::uninterruptible_); @@ -850,7 +851,7 @@ class ClassLinker { const char* descriptor, size_t hash, Handle<mirror::ClassLoader> class_loader, - ObjPtr<mirror::Class>* result) + /*out*/ ObjPtr<mirror::Class>* result) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_); |