summaryrefslogtreecommitdiff
path: root/compiler/exception_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-06-19 14:15:23 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2024-06-20 10:13:31 +0000
commitdaf65911a4e8126d10a0d98b9e3bcb363d373a30 (patch)
tree664ce9f432c4100ecf205ef51d4dbefb688293b0 /compiler/exception_test.cc
parent7d4ebce2d8e15260ecdbfc6b3c67df3b5a7a09b4 (diff)
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
Diffstat (limited to 'compiler/exception_test.cc')
-rw-r--r--compiler/exception_test.cc2
1 files changed, 1 insertions, 1 deletions
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<ArtMethod**>(&fake_stack[0]));
- jobject internal = thread->CreateInternalStackTrace(soa);
+ jobject internal = soa.AddLocalReference<jobject>(thread->CreateInternalStackTrace(soa));
ASSERT_TRUE(internal != nullptr);
jobjectArray ste_array = Thread::InternalStackTraceToStackTraceElementArray(soa, internal);
ASSERT_TRUE(ste_array != nullptr);