Image space cleanup for app images
Removed Heap::GetImageSpace, added Heap::GetBootImageSpace.
Generalized some logic in the class linker for image spaces.
Bug: 22858531
Change-Id: Ib3e12bb061a247e232d3dc93b0d6b35eb3a34d25
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc
index 9eee156..ea6d3ff 100644
--- a/runtime/oat_file_manager.cc
+++ b/runtime/oat_file_manager.cc
@@ -79,11 +79,8 @@
}
const OatFile* OatFileManager::GetBootOatFile() const {
- gc::space::ImageSpace* image_space = Runtime::Current()->GetHeap()->GetImageSpace();
- if (image_space == nullptr) {
- return nullptr;
- }
- return image_space->GetOatFile();
+ gc::space::ImageSpace* image_space = Runtime::Current()->GetHeap()->GetBootImageSpace();
+ return (image_space == nullptr) ? nullptr : image_space->GetOatFile();
}
const OatFile* OatFileManager::GetPrimaryOatFile() const {