From daf65911a4e8126d10a0d98b9e3bcb363d373a30 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 19 Jun 2024 14:15:23 +0100 Subject: Change CreateInternalStackTrace to return a mirror::Object. It might be called in a context where there isn't a JNI frame (for example when throwing in the runtime). So return a mirror::Object instead of jobject. Test: 107-int-math2 with gcstress Change-Id: I72ea87db8cf5092e636901d1114034e81de13146 --- compiler/exception_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/exception_test.cc') diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc index 89fe56dda0..0e289353c7 100644 --- a/compiler/exception_test.cc +++ b/compiler/exception_test.cc @@ -241,7 +241,7 @@ TEST_F(ExceptionTest, StackTraceElement) { // Set up thread to appear as if we called out of method_g_ at given pc dex. thread->SetTopOfStack(reinterpret_cast(&fake_stack[0])); - jobject internal = thread->CreateInternalStackTrace(soa); + jobject internal = soa.AddLocalReference(thread->CreateInternalStackTrace(soa)); ASSERT_TRUE(internal != nullptr); jobjectArray ste_array = Thread::InternalStackTraceToStackTraceElementArray(soa, internal); ASSERT_TRUE(ste_array != nullptr); -- cgit v1.2.3-59-g8ed1b