comparison src/share/vm/prims/whitebox.hpp @ 14521:29ccc4cbabca

Merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 12 Mar 2014 13:30:08 +0100
parents 9e2a544d59cc
children 4ca6dc0799b6 4abb719c5620
comparison
equal deleted inserted replaced
14520:f84115370178 14521:29ccc4cbabca
1 /* 1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
34 34
35 #define WB_ENTRY(result_type, header) JNI_ENTRY(result_type, header) 35 #define WB_ENTRY(result_type, header) JNI_ENTRY(result_type, header)
36 #define WB_END JNI_END 36 #define WB_END JNI_END
37 #define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL 37 #define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL
38 38
39 #define CHECK_JNI_EXCEPTION_(env, value) \
40 do { \
41 JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
42 if (HAS_PENDING_EXCEPTION) { \
43 CLEAR_PENDING_EXCEPTION; \
44 return(value); \
45 } \
46 } while (0)
47
48 #define CHECK_JNI_EXCEPTION(env) \
49 do { \
50 JavaThread* THREAD = JavaThread::thread_from_jni_environment(env); \
51 if (HAS_PENDING_EXCEPTION) { \
52 CLEAR_PENDING_EXCEPTION; \
53 return; \
54 } \
55 } while (0)
56
39 class WhiteBox : public AllStatic { 57 class WhiteBox : public AllStatic {
40 private: 58 private:
41 static bool _used; 59 static bool _used;
42 public: 60 public:
43 static bool used() { return _used; } 61 static bool used() { return _used; }