diff src/os_cpu/linux_zero/vm/thread_linux_zero.hpp @ 1505:0c5b3cf3c1f5

6939182: Zero JNI handles fix Summary: Zero will exit with an error when invoked with -Xcheck:jni. Reviewed-by: twisti, kamg Contributed-by: Gary Benson <gbenson@redhat.com>
author twisti
date Fri, 30 Apr 2010 04:27:25 -0700
parents f9271ff9d324
children 6cfbdb113e52
line wrap: on
line diff
--- a/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	Thu Apr 29 17:53:58 2010 -0700
+++ b/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp	Fri Apr 30 04:27:25 2010 -0700
@@ -68,19 +68,24 @@
 
  public:
   void set_last_Java_frame() {
-    set_last_Java_frame(top_zero_frame());
+    set_last_Java_frame(top_zero_frame(), zero_stack()->sp());
   }
   void reset_last_Java_frame() {
-    set_last_Java_frame(NULL);
+    frame_anchor()->zap();
+  }
+  void set_last_Java_frame(ZeroFrame* fp, intptr_t* sp) {
+    frame_anchor()->set(sp, NULL, fp);
   }
-  void set_last_Java_frame(ZeroFrame* frame) {
-    frame_anchor()->set_last_Java_sp((intptr_t *) frame);
+
+ public:
+  ZeroFrame* last_Java_fp() {
+    return frame_anchor()->last_Java_fp();
   }
 
  private:
   frame pd_last_frame() {
     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    return frame(last_Java_sp(), zero_stack()->sp());
+    return frame(last_Java_fp(), last_Java_sp());
   }
 
  public: