diff agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java @ 3908:7588156f5cf9

7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244) Reviewed-by: kvn
author never
date Mon, 05 Sep 2011 17:09:05 -0700
parents a80577f854f9
children 1d7922586cf6
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java	Sat Sep 03 14:03:54 2011 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java	Mon Sep 05 17:09:05 2011 -0700
@@ -102,6 +102,11 @@
   /** On-Stack Replacement method */
   public boolean isOSRMethod()          { return false; }
 
+  public NMethod asNMethodOrNull() {
+    if (isNMethod()) return (NMethod)this;
+    return null;
+  }
+
   // Boundaries
   public Address headerBegin() {
     return addr;
@@ -195,7 +200,7 @@
   }
 
   // Returns true, if the next frame is responsible for GC'ing oops passed as arguments
-  public boolean callerMustGCArguments(JavaThread thread) { return false; }
+  public boolean callerMustGCArguments() { return false; }
 
   public String getName() {
     return CStringUtilities.getString(nameField.getValue(addr));