summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2017-12-21 17:07:11 -0800
committer Ian Rogers <irogers@google.com> 2017-12-22 10:11:39 -0800
commit55256cb60e11d4fac71affb4b9760a2931a3598d (patch)
treefc1ed6885b013e0aa2bcfd9ef4dd94fec29bd382 /runtime/class_linker.cc
parent64bae9fb677aa0e2406d13ea9f8ebaa92e16f978 (diff)
Extensions to check JNI.
Ensure critical lock isn't held when returning from a down-call. Log a warning if the critical lock is held for a significant period of time. Refactor JNIEnvExt to be a class rather than a struct. Test: mma test-art-host Change-Id: I4d149cb04d3a7308a22b92b196e51e2f1ae17ede
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 55fa6328f5..ae285c7737 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3391,7 +3391,7 @@ void ClassLinker::RegisterDexFileLocked(const DexFile& dex_file,
// Clean up pass to remove null dex caches. Also check if we need to initialize OatFile .bss.
// Null dex caches can occur due to class unloading and we are lazily removing null entries.
bool initialize_oat_file_bss = (oat_file != nullptr);
- JavaVMExt* const vm = self->GetJniEnv()->vm;
+ JavaVMExt* const vm = self->GetJniEnv()->GetVm();
for (auto it = dex_caches_.begin(); it != dex_caches_.end(); ) {
DexCacheData data = *it;
if (self->IsJWeakCleared(data.weak_root)) {
@@ -5269,7 +5269,7 @@ void ClassLinker::RegisterClassLoader(ObjPtr<mirror::ClassLoader> class_loader)
CHECK(class_loader->GetClassTable() == nullptr);
Thread* const self = Thread::Current();
ClassLoaderData data;
- data.weak_root = self->GetJniEnv()->vm->AddWeakGlobalRef(self, class_loader);
+ data.weak_root = self->GetJniEnv()->GetVm()->AddWeakGlobalRef(self, class_loader);
// Create and set the class table.
data.class_table = new ClassTable;
class_loader->SetClassTable(data.class_table);