mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8252685: APIs that require JavaThread should take JavaThread arguments
Reviewed-by: coleenp, sspitsyn, kvn, iklam
This commit is contained in:
parent
2066f497b9
commit
02f895c5f6
120 changed files with 507 additions and 521 deletions
|
@ -105,17 +105,16 @@ class StringTableConfig : public StackObj {
|
|||
typedef WeakHandle Value;
|
||||
|
||||
static uintx get_hash(Value const& value, bool* is_dead) {
|
||||
EXCEPTION_MARK;
|
||||
oop val_oop = value.peek();
|
||||
if (val_oop == NULL) {
|
||||
*is_dead = true;
|
||||
return 0;
|
||||
}
|
||||
*is_dead = false;
|
||||
ResourceMark rm(THREAD);
|
||||
ResourceMark rm;
|
||||
// All String oops are hashed as unicode
|
||||
int length;
|
||||
jchar* chars = java_lang_String::as_unicode_string(val_oop, length, THREAD);
|
||||
jchar* chars = java_lang_String::as_unicode_string_or_null(val_oop, length);
|
||||
if (chars != NULL) {
|
||||
return hash_string(chars, length, _alt_hash);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue