提交 8a7b9d76 编写于 作者: X xlu

6618886: Anonymous objects can be destructed immediately and so should not be used

Reviewed-by: dholmes, kamg
上级 76e07c76
......@@ -71,7 +71,7 @@ static intptr_t compare_and_exchange_current_callback (
if (VM_Version::supports_compare_and_exchange()) {
return Atomic::cmpxchg_ptr(callback, addr, compare_value);
} else {
MutexLockerEx(sync, Mutex::_no_safepoint_check_flag);
MutexLockerEx ml(sync, Mutex::_no_safepoint_check_flag);
if (*addr == compare_value) {
*addr = callback;
return compare_value;
......@@ -86,7 +86,7 @@ static intptr_t exchange_current_callback(intptr_t callback, intptr_t *addr, Mut
if (VM_Version::supports_compare_and_exchange()) {
return Atomic::xchg_ptr(callback, addr);
} else {
MutexLockerEx(sync, Mutex::_no_safepoint_check_flag);
MutexLockerEx ml(sync, Mutex::_no_safepoint_check_flag);
intptr_t cb = *addr;
*addr = callback;
return cb;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册