summaryrefslogtreecommitdiff
path: root/runtime/gc/space/image_space.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-08-24 00:05:48 +0000
committer android-build-merger <android-build-merger@google.com> 2016-08-24 00:05:48 +0000
commitf47f9574b87ec2e7f09cf7ed41dd4e68f14c9d0c (patch)
tree5e5b3c7569af90f33190281125a5881bd23ce8aa /runtime/gc/space/image_space.cc
parentcd5e6d18ebdc1cd43295cf58c13741876c349833 (diff)
parente99331f7a430b0b72142dd0b8b0689421489dcf6 (diff)
Merge "ART: Validate oat file for cache-only images"
am: e99331f7a4 Change-Id: I53696ee4ad5b600688ee6f9666aed40047e60f8f
Diffstat (limited to 'runtime/gc/space/image_space.cc')
-rw-r--r--runtime/gc/space/image_space.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index ae6c3214a7..c87312b655 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -454,8 +454,7 @@ class ImageSpaceLoader {
const std::string& image_filename,
bool is_zygote,
bool is_global_cache,
- bool is_system,
- bool relocated_version_used,
+ bool validate_oat_file,
std::string* error_msg)
SHARED_REQUIRES(Locks::mutator_lock_) {
// Note that we must not use the file descriptor associated with
@@ -483,7 +482,7 @@ class ImageSpaceLoader {
// file name.
return Init(image_filename.c_str(),
image_location,
- !(is_system || relocated_version_used),
+ validate_oat_file,
/* oat_file */nullptr,
error_msg);
}
@@ -1473,8 +1472,7 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati
cache_filename,
is_zygote,
is_global_cache,
- /* is_system */ false,
- /* relocated_version_used */ true,
+ /* validate_oat_file */ false,
&local_error_msg);
if (relocated_space != nullptr) {
return relocated_space;
@@ -1491,8 +1489,7 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati
cache_filename,
is_zygote,
is_global_cache,
- /* is_system */ false,
- /* relocated_version_used */ true,
+ /* validate_oat_file */ true,
&local_error_msg);
if (cache_space != nullptr) {
return cache_space;
@@ -1512,8 +1509,7 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati
system_filename,
is_zygote,
is_global_cache,
- /* is_system */ true,
- /* relocated_version_used */ false,
+ /* validate_oat_file */ false,
&local_error_msg);
if (system_space != nullptr) {
return system_space;
@@ -1538,8 +1534,7 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati
cache_filename,
is_zygote,
is_global_cache,
- /* is_system */ false,
- /* relocated_version_used */ true,
+ /* validate_oat_file */ false,
&local_error_msg);
if (patched_space != nullptr) {
return patched_space;
@@ -1568,8 +1563,7 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati
cache_filename,
is_zygote,
is_global_cache,
- /* is_system */ false,
- /* relocated_version_used */ true,
+ /* validate_oat_file */ false,
&local_error_msg);
if (compiled_space != nullptr) {
return compiled_space;