diff options
Diffstat (limited to 'runtime/class_loader_utils.h')
-rw-r--r-- | runtime/class_loader_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/class_loader_utils.h b/runtime/class_loader_utils.h index 908d06225b..6868b3f38a 100644 --- a/runtime/class_loader_utils.h +++ b/runtime/class_loader_utils.h @@ -118,7 +118,9 @@ inline RetType VisitClassLoaderDexFiles(Thread* self, REQUIRES_SHARED(Locks::mutator_lock_) { ObjPtr<mirror::Object> dex_file = dex_file_field->GetObject(element); if (dex_file != nullptr) { - ObjPtr<mirror::LongArray> long_array = cookie_field->GetObject(dex_file)->AsLongArray(); + StackHandleScope<1> hs(self); + Handle<mirror::LongArray> long_array = + hs.NewHandle(cookie_field->GetObject(dex_file)->AsLongArray()); if (long_array == nullptr) { // This should never happen so log a warning. LOG(WARNING) << "Null DexFile::mCookie"; |