Revert^2 "Support shared libraries in CreateContextFromClassLoader."
This reverts commit 1717a493a4a0c1c3b69ecfcb58838627b4c75878.
bug: 120036590
bug: 120031686
Reason for revert: Fix code to ensure ownership of dex files.
Change-Id: I99fffb52b73e0a41d779a41605ddf2e9249c02e0
diff --git a/runtime/class_loader_context.h b/runtime/class_loader_context.h
index 71f40ac..5a89c4e 100644
--- a/runtime/class_loader_context.h
+++ b/runtime/class_loader_context.h
@@ -227,12 +227,14 @@
// of the call.
void CheckDexFilesOpened(const std::string& calling_method) const;
- // Adds the `class_loader` info to the context.
+ // Creates the `ClassLoaderInfo` representing`class_loader` and attach it to `this`.
// The dex file present in `dex_elements` array (if not null) will be added at the end of
// the classpath.
- bool AddInfoToContextFromClassLoader(ScopedObjectAccessAlreadyRunnable& soa,
- Handle<mirror::ClassLoader> class_loader,
- Handle<mirror::ObjectArray<mirror::Object>> dex_elements)
+ bool CreateInfoFromClassLoader(ScopedObjectAccessAlreadyRunnable& soa,
+ Handle<mirror::ClassLoader> class_loader,
+ Handle<mirror::ObjectArray<mirror::Object>> dex_elements,
+ ClassLoaderInfo* child_info,
+ bool is_shared_library)
REQUIRES_SHARED(Locks::mutator_lock_);
// Encodes the context as a string suitable to be passed to dex2oat or to be added to the