mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8186088: ConstantPoolCache::_resolved_references is not a JNIHandle
Make an OopHandle type to replace jobject to encapsulate these oop pointers in metadata and module entry. Reviewed-by: sspitsyn, dholmes, jiangli, twisti
This commit is contained in:
parent
c1f2527986
commit
111116dd5b
31 changed files with 142 additions and 48 deletions
|
@ -1490,14 +1490,14 @@ JvmtiMonitorClosure::do_monitor(ObjectMonitor* mon) {
|
|||
}
|
||||
}
|
||||
|
||||
GrowableArray<jobject>* JvmtiModuleClosure::_tbl = NULL;
|
||||
GrowableArray<OopHandle>* JvmtiModuleClosure::_tbl = NULL;
|
||||
|
||||
jvmtiError
|
||||
JvmtiModuleClosure::get_all_modules(JvmtiEnv* env, jint* module_count_ptr, jobject** modules_ptr) {
|
||||
ResourceMark rm;
|
||||
MutexLocker ml(Module_lock);
|
||||
|
||||
_tbl = new GrowableArray<jobject>(77);
|
||||
_tbl = new GrowableArray<OopHandle>(77);
|
||||
if (_tbl == NULL) {
|
||||
return JVMTI_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -1513,7 +1513,7 @@ JvmtiModuleClosure::get_all_modules(JvmtiEnv* env, jint* module_count_ptr, jobje
|
|||
return JVMTI_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
for (jint idx = 0; idx < len; idx++) {
|
||||
array[idx] = _tbl->at(idx);
|
||||
array[idx] = JNIHandles::make_local(Thread::current(), _tbl->at(idx).resolve());
|
||||
}
|
||||
_tbl = NULL;
|
||||
*modules_ptr = array;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue