summaryrefslogtreecommitdiff
path: root/runtime/oat_file_manager.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2023-01-30 14:29:11 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2023-02-01 09:52:45 +0000
commit0f6af5e3b51a7f5905d09a98ec8d531541666015 (patch)
tree7ed720cc521bb7f6e3b092cf6900a34d050c3aba /runtime/oat_file_manager.cc
parentd04ed700190056ecd367ee41e6b7f3b87dc7f901 (diff)
Reland "Write classes in runtime-generated app image."
This reverts commit 24b3d648ff6c2c200003f55ac63fc910d7bfd40f. Bug: 260557058 Reason for revert: - Encode class loader context in image, and check it at load time. - Set nterp entrypoint to methods that can. Test: test.py Test: atest com.android.bluetooth.opp.BluetoothOppObexServerSessionTest#onPut_withUnsupportedMimeTypeInHeader_returnsHttpBadRequest Change-Id: Ibf4a8604c4a226d1acc021103668e211446bb53c
Diffstat (limited to 'runtime/oat_file_manager.cc')
-rw-r--r--runtime/oat_file_manager.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc
index 635122038a..b0bcd2f878 100644
--- a/runtime/oat_file_manager.cc
+++ b/runtime/oat_file_manager.cc
@@ -301,6 +301,7 @@ std::vector<std::unique_ptr<const DexFile>> OatFileManager::OpenDexFilesFromOat(
ScopedTrace image_space_timing("Adding image space");
added_image_space = runtime->GetClassLinker()->AddImageSpace(image_space.get(),
h_loader,
+ context.get(),
/*out*/&dex_files,
/*out*/&temp_error_msg);
}
@@ -590,7 +591,8 @@ std::vector<std::unique_ptr<const DexFile>> OatFileManager::OpenDexFilesFromOat_
// Initialize an OatFile instance backed by the loaded vdex.
std::unique_ptr<OatFile> oat_file(OatFile::OpenFromVdex(MakeNonOwningPointerVector(dex_files),
std::move(vdex_file),
- dex_location));
+ dex_location,
+ context.get()));
if (oat_file != nullptr) {
VLOG(class_linker) << "Registering " << oat_file->GetLocation();
*out_oat_file = RegisterOatFile(std::move(oat_file));