summaryrefslogtreecommitdiff
path: root/runtime/class_loader_context.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2021-04-17 16:47:01 +0000
committer David Srbecky <dsrbecky@google.com> 2021-04-17 19:19:50 +0000
commit656fdcd7f2aa9920ecd464dbb59d284e17969baa (patch)
treed4be59ae4c11c12a7bc7d6343f9add9bed0b6e33 /runtime/class_loader_context.cc
parentefbc659ba4566f6fbad3d13bea170fb522955b8a (diff)
Revert "Integrate ClassLoaderContext check in OatFileAssistant::GetBestOatFile."
This reverts commit c8fe6517faf91b45683cddff3c15e08e489e12e9. Reason for revert: Breaks 1002-notify-startup (flaky) Test: "art/test.py -r --host -t 1002" in a loop Bug: 176960283 Change-Id: I4f5467efa5a1e09452b28b86b183791e4105b19e
Diffstat (limited to 'runtime/class_loader_context.cc')
-rw-r--r--runtime/class_loader_context.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc
index 228b95028a..b5ce122c95 100644
--- a/runtime/class_loader_context.cc
+++ b/runtime/class_loader_context.cc
@@ -412,9 +412,7 @@ bool ClassLoaderContext::OpenDexFiles(const std::string& classpath_dir,
// no dex files. So that we can distinguish the real failures...
const ArtDexFileLoader dex_file_loader;
std::vector<ClassLoaderInfo*> work_list;
- if (class_loader_chain_ == nullptr) {
- return true;
- }
+ CHECK(class_loader_chain_ != nullptr);
work_list.push_back(class_loader_chain_.get());
size_t dex_file_index = 0;
while (!work_list.empty()) {
@@ -1157,9 +1155,7 @@ std::unique_ptr<ClassLoaderContext> ClassLoaderContext::CreateContextForClassLoa
jobjectArray dex_elements) {
ScopedTrace trace(__FUNCTION__);
- if (class_loader == nullptr) {
- return nullptr;
- }
+ CHECK(class_loader != nullptr);
ScopedObjectAccess soa(Thread::Current());
StackHandleScope<2> hs(soa.Self());
Handle<mirror::ClassLoader> h_class_loader =