8300024: Replace use of JNI_COMMIT mode with mode 0

Reviewed-by: amenkov, sspitsyn, cjplummer
This commit is contained in:
Daniel Jeliński 2023-01-16 06:58:27 +00:00
parent fe7fca0128
commit 50e7df91c7
4 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2021, NTT DATA.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -600,7 +600,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
#endif
env->ReleaseLongArrayElements(array, regs, JNI_COMMIT);
env->ReleaseLongArrayElements(array, regs, 0);
return array;
}
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -621,7 +621,7 @@ jlongArray getThreadIntegerRegisterSetFromCore(JNIEnv *env, jobject this_obj, lo
#error UNSUPPORTED_ARCH
#endif
(*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
(*env)->ReleaseLongArrayElements(env, array, regs, 0);
return array;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -625,7 +625,7 @@ static bool addThreads(JNIEnv* env, jobject obj) {
ptrRegs[REG_INDEX(RIP)] = context.Rip;
#endif
env->ReleaseLongArrayElements(regs, ptrRegs, JNI_COMMIT);
env->ReleaseLongArrayElements(regs, ptrRegs, 0);
CHECK_EXCEPTION_(false);
env->CallVoidMethod(obj, setThreadIntegerRegisterSet_ID, (jlong)ptrThreadIds[t], regs);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -166,7 +166,7 @@ public:
result = nullptr;
} else {
memcpy(arrayPtr, savedClassBytes, savedClassBytesLen);
env->ReleaseByteArrayElements(result, arrayPtr, JNI_COMMIT);
env->ReleaseByteArrayElements(result, arrayPtr, 0);
}
}
return result;