8252685: APIs that require JavaThread should take JavaThread arguments

Reviewed-by: coleenp, sspitsyn, kvn, iklam
This commit is contained in:
David Holmes 2021-05-17 04:05:44 +00:00
parent 2066f497b9
commit 02f895c5f6
120 changed files with 507 additions and 521 deletions

View file

@ -472,17 +472,17 @@ Symbol* SymbolTable::do_add_if_needed(const char* name, int len, uintx hash, boo
bool clean_hint = false;
bool rehash_warning = false;
Symbol* sym = NULL;
Thread* THREAD = Thread::current();
Thread* current = Thread::current();
do {
// Callers have looked up the symbol once, insert the symbol.
sym = allocate_symbol(name, len, heap);
if (_local_table->insert(THREAD, lookup, sym, &rehash_warning, &clean_hint)) {
if (_local_table->insert(current, lookup, sym, &rehash_warning, &clean_hint)) {
break;
}
// In case another thread did a concurrent add, return value already in the table.
// This could fail if the symbol got deleted concurrently, so loop back until success.
if (_local_table->get(THREAD, lookup, stg, &rehash_warning)) {
if (_local_table->get(current, lookup, stg, &rehash_warning)) {
sym = stg.get_res_sym();
break;
}