From 9b5cba401aae6d34450112bdcf9bab5e19da90f2 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 11 Mar 2015 09:53:50 -0700 Subject: [PATCH] ART: Missing include Fix missing include. Change-Id: I439bdf3a5c7dc2a710f3dfa0dca494ac3698de60 --- runtime/common_runtime_test.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc index c7cee4708..84865973c 100644 --- a/runtime/common_runtime_test.cc +++ b/runtime/common_runtime_test.cc @@ -34,6 +34,7 @@ #include "gc_root-inl.h" #include "gc/heap.h" #include "gtest/gtest.h" +#include "interpreter/unstarted_runtime.h" #include "jni_internal.h" #include "mirror/class_loader.h" #include "mem_map.h" @@ -108,6 +109,8 @@ void ScratchFile::Unlink() { CHECK_EQ(0, unlink_result); } +static bool unstarted_initialized_ = false; + CommonRuntimeTest::CommonRuntimeTest() {} CommonRuntimeTest::~CommonRuntimeTest() { // Ensure the dex files are cleaned up before the runtime. @@ -239,7 +242,10 @@ void CommonRuntimeTest::SetUp() { // Initialize maps for unstarted runtime. This needs to be here, as running clinits needs this // set up. - interpreter::UnstartedRuntimeInitialize(); + if (!unstarted_initialized_) { + interpreter::UnstartedRuntimeInitialize(); + unstarted_initialized_ = true; + } class_linker_->RunRootClinits(); boot_class_path_ = class_linker_->GetBootClassPath(); -- 2.11.0