src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JNIHandles.java
changeset 48787 7638bf98a312
parent 47216 71c04702a3d5
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JNIHandles.java	Sat Jan 13 02:56:22 2018 +0100
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JNIHandles.java	Tue Nov 21 09:47:55 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -27,11 +27,11 @@
 import java.util.*;
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.gc.shared.OopStorage;
 
 public class JNIHandles {
   private static AddressField      globalHandlesField;
   private static AddressField      weakGlobalHandlesField;
-  private static OopField          deletedHandleField;
 
   static {
     VM.registerVMInitializedObserver(new Observer() {
@@ -46,35 +46,26 @@
 
     globalHandlesField = type.getAddressField("_global_handles");
     weakGlobalHandlesField = type.getAddressField("_weak_global_handles");
-    deletedHandleField = type.getOopField("_deleted_handle");
 
   }
 
   public JNIHandles() {
   }
 
-  public JNIHandleBlock globalHandles() {
+  public OopStorage globalHandles() {
     Address handleAddr  = globalHandlesField.getValue();
     if (handleAddr == null) {
       return null;
     }
-    return new JNIHandleBlock(handleAddr);
+    return new OopStorage(handleAddr);
   }
 
-  public JNIHandleBlock weakGlobalHandles() {
+  public OopStorage weakGlobalHandles() {
     Address handleAddr  = weakGlobalHandlesField.getValue();
     if (handleAddr == null) {
       return null;
     }
-    return new JNIHandleBlock(handleAddr);
-  }
-
-  public OopHandle deletedHandle() {
-    return deletedHandleField.getValue();
-  }
-
-  public boolean isDeletedHandle(OopHandle handle) {
-    return (handle != null && handle.equals(deletedHandle()));
+    return new OopStorage(handleAddr);
   }
 
 }