diff options
author | 2019-03-22 13:38:57 +0000 | |
---|---|---|
committer | 2019-03-25 16:54:37 +0000 | |
commit | 179b7c61ea6769b99f70c80a7a89cbb212423ec2 (patch) | |
tree | 06130898bfb2d8c3f71f4fe181277f20e1942726 /runtime/mirror/class.cc | |
parent | c8b7d445e02b752a68d824e2bc69658dfb76288a (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.cc')
-rw-r--r-- | runtime/mirror/class.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 239105f36f..74b22c4204 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -252,8 +252,8 @@ void Class::SetClassSize(uint32_t new_class_size) { // Class.getName: keywords for primitive types, regular "[I" form for primitive arrays (so "int" // but "[I"), and arrays of reference types written between "L" and ";" but with dots rather than // slashes (so "java.lang.String" but "[Ljava.lang.String;"). Madness. -String* Class::ComputeName(Handle<Class> h_this) { - String* name = h_this->GetName(); +ObjPtr<String> Class::ComputeName(Handle<Class> h_this) { + ObjPtr<String> name = h_this->GetName(); if (name != nullptr) { return name; } |