diff options
Diffstat (limited to 'openjdkjvmti/fixed_up_dex_file.cc')
-rw-r--r-- | openjdkjvmti/fixed_up_dex_file.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/openjdkjvmti/fixed_up_dex_file.cc b/openjdkjvmti/fixed_up_dex_file.cc index 079cd98915..da7eef963d 100644 --- a/openjdkjvmti/fixed_up_dex_file.cc +++ b/openjdkjvmti/fixed_up_dex_file.cc @@ -87,8 +87,7 @@ static void DCheckVerifyDexFile(const art::DexFile& dex) { } } -std::unique_ptr<FixedUpDexFile> FixedUpDexFile::Create(jobject class_loader, - const art::DexFile& original, +std::unique_ptr<FixedUpDexFile> FixedUpDexFile::Create(const art::DexFile& original, const char* descriptor) { // Copy the data into mutable memory. std::vector<unsigned char> data; @@ -101,11 +100,11 @@ std::unique_ptr<FixedUpDexFile> FixedUpDexFile::Create(jobject class_loader, // property from `original` to `new_dex_file`. const art::DexFileLoader dex_file_loader; - if (original.IsCompactDexFile() || class_loader == nullptr) { + if (original.IsCompactDexFile() || original.HasHiddenapiClassData()) { // Since we are supposed to return a standard dex, convert back using dexlayout. It's OK to do // this before unquickening. - // We also do dex layout for boot classpath dex files, as they contain hidden API flags which - // we want to remove. + // We also do dex layout for dex files that have hidden API data, as we want to remove that + // data. art::Options options; options.compact_dex_level_ = art::CompactDexLevel::kCompactDexLevelNone; // Add a filter to only include the class that has the matching descriptor. |