diff options
| author | 2022-11-18 10:55:05 +0000 | |
|---|---|---|
| committer | 2022-11-21 14:25:03 +0000 | |
| commit | f7bd1fa21250302ef885ffef3b1e096d53b0845c (patch) | |
| tree | cf2deeb39a4f19550c9190f958171dadd932b950 /runtime/interpreter/unstarted_runtime.cc | |
| parent | f356dcd48faaab0bb78fe085b9d429ff4cdd6d59 (diff) | |
Change well known thread methods to `ArtMethod*`.
Also rename `java_lang_ThreadGroup_removeThread` to
`java_lang_ThreadGroup_threadTerminated` in line with
the actual method it references.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Iaf2644d006f44759a47587c82db2dcdba0bfa67e
Diffstat (limited to 'runtime/interpreter/unstarted_runtime.cc')
| -rw-r--r-- | runtime/interpreter/unstarted_runtime.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc index 5678732c9b..c1cae6f124 100644 --- a/runtime/interpreter/unstarted_runtime.cc +++ b/runtime/interpreter/unstarted_runtime.cc @@ -1112,18 +1112,14 @@ void UnstartedRuntime::UnstartedThreadCurrentThread( // thread as unstarted to the ThreadGroup. A faked-up main thread peer is good enough for // these purposes. Runtime::Current()->InitThreadGroups(self); - jobject main_peer = - self->CreateCompileTimePeer(self->GetJniEnv(), - "main", - false, - Runtime::Current()->GetMainThreadGroup()); + ObjPtr<mirror::Object> main_peer = self->CreateCompileTimePeer( + "main", /*as_daemon=*/ false, Runtime::Current()->GetMainThreadGroup()); if (main_peer == nullptr) { AbortTransactionOrFail(self, "Failed allocating peer"); return; } - result->SetL(self->DecodeJObject(main_peer)); - self->GetJniEnv()->DeleteLocalRef(main_peer); + result->SetL(main_peer); } else { AbortTransactionOrFail(self, "Thread.currentThread() does not support %s", |