mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8256517
: (ref) Reference.clear during reference processing may lose notification
8240696: (ref) Reference.clear may extend the lifetime of the referent Use private native helper to implement Reference.clear. Reviewed-by: pliden, rkennke, mchung
This commit is contained in:
parent
3c230b8ac5
commit
66943fefa7
14 changed files with 295 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, 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
|
||||
|
@ -82,7 +82,7 @@ final class Finalizer extends FinalReference<Object> { /* Package-private; must
|
|||
}
|
||||
|
||||
try {
|
||||
Object finalizee = this.getInactive();
|
||||
Object finalizee = this.get();
|
||||
assert finalizee != null;
|
||||
if (!(finalizee instanceof java.lang.Enum)) {
|
||||
jla.invokeFinalize(finalizee);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue