Mercurial > hg > graal-compiler
diff src/share/vm/prims/whitebox.hpp @ 14370:4f6bf7dd3f52
8028785: [parfait] warnings from b116 for hotspot.src.share.vm.prims: JNI exception pending
Summary: added JNI exception pending check in several files under src/share/vm/prims directory
Reviewed-by: coleenp, minqi
author | ccheung |
---|---|
date | Wed, 12 Feb 2014 12:01:45 -0800 |
parents | de6a9e811145 |
children | 9e2a544d59cc |
line wrap: on
line diff
--- a/src/share/vm/prims/whitebox.hpp Tue Feb 11 21:32:19 2014 -0800 +++ b/src/share/vm/prims/whitebox.hpp Wed Feb 12 12:01:45 2014 -0800 @@ -36,6 +36,22 @@ #define WB_END JNI_END #define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL +#define CHECK_JNI_EXCEPTION_(env, value) \ + do { \ + if (env->ExceptionCheck()) { \ + env->ExceptionClear(); \ + return(value); \ + } \ + } while (0) + +#define CHECK_JNI_EXCEPTION(env) \ + do { \ + if (env->ExceptionCheck()) { \ + env->ExceptionClear(); \ + return; \ + } \ + } while (0) + class WhiteBox : public AllStatic { private: static bool _used;