summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Almaz Mingaleev <mingaleev@google.com> 2024-10-17 07:54:39 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-17 12:30:28 +0000
commita5f50ab9af9f5456bbd4b49def3393e3986b21e1 (patch)
treee7f95cbc5551567d3c694a6604c40ed82d89f3be
parentd96190b790e4cde51e992d7613e6df1af63a9b35 (diff)
Instread of throwing ISE, abort transaction in ...
UnstartedRuntime::SystemNanoTime. A caller might catch that ISE and follow a different code path. Bug: 297147201 Test: ./art/test/testrunner/testrunner.py --host --64 -b Change-Id: I46bbab490c403d807c8a50d1749fc2f176d2c710
-rw-r--r--runtime/interpreter/unstarted_runtime.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc
index 06aeff8394..0478efe0e5 100644
--- a/runtime/interpreter/unstarted_runtime.cc
+++ b/runtime/interpreter/unstarted_runtime.cc
@@ -1050,8 +1050,7 @@ void UnstartedRuntime::UnstartedSystemNanoTime(Thread* self, ShadowFrame*, JValu
// We don't want `System.nanoTime` to be called at compile time because `java.util.Random`'s
// default constructor uses `nanoTime` to initialize seed and having it set during compile time
// makes that `java.util.Random` instance deterministic for given system image.
- self->ThrowNewException("Ljava/lang/IllegalStateException;",
- "Should not be called by UnstartedRuntime");
+ AbortTransactionOrFail(self, "Should not be called by UnstartedRuntime");
}
static std::string GetImmediateCaller(ShadowFrame* shadow_frame)