hotspot/src/share/vm/runtime/thread.hpp
changeset 25058 4542f853c2ac
parent 24424 2658d7834c6e
child 25064 244218e6ec0a
--- a/hotspot/src/share/vm/runtime/thread.hpp	Wed Jun 11 09:58:23 2014 -0400
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Wed Jun 11 18:34:09 2014 +0200
@@ -915,6 +915,9 @@
   // support for JNI critical regions
   jint    _jni_active_critical;                  // count of entries into JNI critical region
 
+  // Checked JNI: function name requires exception check
+  char* _pending_jni_exception_check_fn;
+
   // For deadlock detection.
   int _depth_first_number;
 
@@ -1400,6 +1403,12 @@
                           assert(_jni_active_critical >= 0,
                                  "JNI critical nesting problem?"); }
 
+  // Checked JNI, is the programmer required to check for exceptions, specify which function name
+  bool is_pending_jni_exception_check() const { return _pending_jni_exception_check_fn != NULL; }
+  void clear_pending_jni_exception_check() { _pending_jni_exception_check_fn = NULL; }
+  const char* get_pending_jni_exception_check() const { return _pending_jni_exception_check_fn; }
+  void set_pending_jni_exception_check(const char* fn_name) { _pending_jni_exception_check_fn = (char*) fn_name; }
+
   // For deadlock detection
   int depth_first_number() { return _depth_first_number; }
   void set_depth_first_number(int dfn) { _depth_first_number = dfn; }