diff options
author | Richard Uhler <ruhler@google.com> | 2014-12-23 09:48:51 -0800 |
---|---|---|
committer | Richard Uhler <ruhler@google.com> | 2015-01-13 16:32:34 -0800 |
commit | fbef44de596d298dc6430f482dffc933a046dd28 (patch) | |
tree | 57345e86b7dda80b82a263069230b7e312db5ef2 /runtime/class_linker.h | |
parent | 603104b5b5c3759b0bc2733bda2f972686a775a3 (diff) | |
download | art-fbef44de596d298dc6430f482dffc933a046dd28.tar.gz art-fbef44de596d298dc6430f482dffc933a046dd28.tar.bz2 art-fbef44de596d298dc6430f482dffc933a046dd28.zip |
Use unique_ptr to track ownership of dex files.
Bug: 18809837
Change-Id: Ie571eae8fc19ee9207390cff5c7e2a38071b126a
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 6461835485..6570c5f02a 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -105,7 +105,7 @@ class ClassLinker { ~ClassLinker(); // Initialize class linker by bootstraping from dex files. - void InitWithoutImage(const std::vector<const DexFile*>& boot_class_path) + void InitWithoutImage(std::vector<std::unique_ptr<const DexFile>> boot_class_path) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Initialize class linker from one or more images. @@ -324,7 +324,7 @@ class ClassLinker { // (if multidex) into the given vector. bool OpenDexFilesFromOat(const char* dex_location, const char* oat_location, std::vector<std::string>* error_msgs, - std::vector<const DexFile*>* dex_files) + std::vector<std::unique_ptr<const DexFile>>* dex_files) LOCKS_EXCLUDED(dex_lock_, Locks::mutator_lock_); // Returns true if the given oat file has the same image checksum as the image it is paired with. @@ -722,6 +722,7 @@ class ClassLinker { const void* GetRuntimeQuickGenericJniStub() const; std::vector<const DexFile*> boot_class_path_; + std::vector<std::unique_ptr<const DexFile>> opened_dex_files_; mutable ReaderWriterMutex dex_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; std::vector<size_t> new_dex_cache_roots_ GUARDED_BY(dex_lock_); |