summaryrefslogtreecommitdiff
path: root/runtime/mirror/class.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-03-22 13:38:57 +0000
committer Vladimir Marko <vmarko@google.com> 2019-03-25 16:54:37 +0000
commit179b7c61ea6769b99f70c80a7a89cbb212423ec2 (patch)
tree06130898bfb2d8c3f71f4fe181277f20e1942726 /runtime/mirror/class.h
parentc8b7d445e02b752a68d824e2bc69658dfb76288a (diff)
ObjPtr<>-ify String allocations, fix stale refs.
ObjPtr<>-ify String allocation functions and related code and remove some unnecessary calls to ObjPtr<>::Ptr(). Fix stale reference uses in reference_table_test and stub_test. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: I42927fb8b7240e5132188f73318b2ccb218748fd
Diffstat (limited to 'runtime/mirror/class.h')
-rw-r--r--runtime/mirror/class.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index e8a7c1e3d6..6ae3c7959e 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -340,10 +340,10 @@ class MANAGED Class final : public Object {
template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags,
ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
- String* GetName() REQUIRES_SHARED(Locks::mutator_lock_); // Returns the cached name.
+ ObjPtr<String> GetName() REQUIRES_SHARED(Locks::mutator_lock_); // Returns the cached name.
void SetName(ObjPtr<String> name) REQUIRES_SHARED(Locks::mutator_lock_); // Sets the cached name.
// Computes the name, then sets the cached value.
- static String* ComputeName(Handle<Class> h_this) REQUIRES_SHARED(Locks::mutator_lock_)
+ static ObjPtr<String> ComputeName(Handle<Class> h_this) REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Roles::uninterruptible_);
template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>