diff options
author | 2025-01-23 10:08:53 +0000 | |
---|---|---|
committer | 2025-01-23 07:28:58 -0800 | |
commit | 70292c9cea31ff6b8ae4697ff0e4dfe3a7d9891e (patch) | |
tree | d45dc5b3af576a5a34cdc24286e678aa524b0bc6 /cmdline | |
parent | 4a1b177c777d541b408408442378d6c4a2185599 (diff) |
Manually initialize WellKnownClasses required by tests.
Test: test.py
Change-Id: Ibb46f964203d204665502c5d824e33945bbb14cd
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/cmdline.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmdline/cmdline.h b/cmdline/cmdline.h index 39fcaebd63..20f5dbed7f 100644 --- a/cmdline/cmdline.h +++ b/cmdline/cmdline.h @@ -33,9 +33,11 @@ #include "base/logging.h" #include "base/mutex.h" #include "base/utils.h" +#include "jni/jni_env_ext.h" #include "noop_compiler_callbacks.h" #include "oat/oat_file_assistant_context.h" #include "runtime.h" +#include "well_known_classes.h" #if !defined(NDEBUG) #define DBG_LOG LOG(INFO) @@ -85,6 +87,9 @@ static Runtime* StartRuntime(const std::vector<std::string>& boot_image_location return nullptr; } + // Need well-known-classes. + WellKnownClasses::Init(Thread::Current()->GetJniEnv()); + // Runtime::Create acquired the mutator_lock_ that is normally given away when we Runtime::Start, // give it away now and then switch to a more manageable ScopedObjectAccess. Thread::Current()->TransitionFromRunnableToSuspended(ThreadState::kNative); |