Remove GcRoot<> static from Throwable and related classes.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: I8115e6413a07419ec261af3ec5068833b72b5218
diff --git a/runtime/interpreter/unstarted_runtime_test.cc b/runtime/interpreter/unstarted_runtime_test.cc
index 98fe8b2..9bb760c 100644
--- a/runtime/interpreter/unstarted_runtime_test.cc
+++ b/runtime/interpreter/unstarted_runtime_test.cc
@@ -1348,7 +1348,7 @@
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
// Get Throwable.
- Handle<mirror::Class> throw_class = hs.NewHandle(mirror::Throwable::GetJavaLangThrowable());
+ Handle<mirror::Class> throw_class = hs.NewHandle(GetClassRoot<mirror::Throwable>());
ASSERT_TRUE(class_linker->EnsureInitialized(self, throw_class, true, true));
// Get an input object.
@@ -1387,8 +1387,8 @@
// Should be a new object.
ASSERT_NE(result.GetL(), input.Get());
- // Should be a String.
- ASSERT_EQ(mirror::Throwable::GetJavaLangThrowable(), result.GetL()->GetClass());
+ // Should be of type Throwable.
+ ASSERT_OBJ_PTR_EQ(GetClassRoot<mirror::Throwable>(), result.GetL()->GetClass());
// Should have the right string.
ObjPtr<mirror::String> result_msg =
reinterpret_cast<mirror::Throwable*>(result.GetL())->GetDetailMessage();