File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,22 @@ static boolean waitForReferenceProcessing() throws InterruptedException {
197197 static void reachabilityFence (Object ref ) {
198198 GraalDirectives .blackhole (ref );
199199 }
200+
201+ @ Substitute //
202+ @ TargetElement (onlyWith = JDK16OrLater .class ) //
203+ T getFromInactiveFinalReference () {
204+ // assert this instanceof FinalReference;
205+ assert next != null ; // I.e. FinalReference is inactive
206+ return get ();
207+ }
208+
209+ @ Substitute //
210+ @ TargetElement (onlyWith = JDK16OrLater .class ) //
211+ void clearInactiveFinalReference () {
212+ // assert this instanceof FinalReference;
213+ assert next != null ; // I.e. FinalReference is inactive
214+ clear ();
215+ }
200216}
201217
202218/** We provide our own {@link com.oracle.svm.core.heap.ReferenceHandler}. */
You can’t perform that action at this time.
0 commit comments