OSDN Git Service

ART: Missing include
authorAndreas Gampe <agampe@google.com>
Wed, 11 Mar 2015 16:53:50 +0000 (09:53 -0700)
committerAndreas Gampe <agampe@google.com>
Wed, 11 Mar 2015 17:01:29 +0000 (10:01 -0700)
Fix missing include.

Change-Id: I439bdf3a5c7dc2a710f3dfa0dca494ac3698de60

runtime/common_runtime_test.cc

index c7cee47..8486597 100644 (file)
@@ -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();