mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8193222: EnsureLocalCapacity() should maintain capacity requests through multiple calls
Reviewed-by: coleenp, dcubed
This commit is contained in:
parent
7ae2347baf
commit
b1001c7d7d
4 changed files with 139 additions and 1 deletions
|
@ -826,7 +826,10 @@ JNI_ENTRY_CHECKED(jint,
|
|||
}
|
||||
jint result = UNCHECKED()->EnsureLocalCapacity(env, capacity);
|
||||
if (result == JNI_OK) {
|
||||
add_planned_handle_capacity(thr->active_handles(), capacity);
|
||||
// increase local ref capacity if needed
|
||||
if ((size_t)capacity > thr->active_handles()->get_planned_capacity()) {
|
||||
add_planned_handle_capacity(thr->active_handles(), capacity);
|
||||
}
|
||||
}
|
||||
functionExit(thr);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue