Mercurial > hg > graal-compiler
comparison src/share/vm/prims/jniCheck.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 89152779163c 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2014, 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. |
98 #define JNI_ENTRY_CHECKED(result_type, header) \ | 98 #define JNI_ENTRY_CHECKED(result_type, header) \ |
99 extern "C" { \ | 99 extern "C" { \ |
100 result_type JNICALL header { \ | 100 result_type JNICALL header { \ |
101 JavaThread* thr = (JavaThread*)ThreadLocalStorage::get_thread_slow();\ | 101 JavaThread* thr = (JavaThread*)ThreadLocalStorage::get_thread_slow();\ |
102 if (thr == NULL || !thr->is_Java_thread()) { \ | 102 if (thr == NULL || !thr->is_Java_thread()) { \ |
103 tty->print_cr(fatal_using_jnienv_in_nonjava); \ | 103 tty->print_cr("%s", fatal_using_jnienv_in_nonjava); \ |
104 os::abort(true); \ | 104 os::abort(true); \ |
105 } \ | 105 } \ |
106 JNIEnv* xenv = thr->jni_environment(); \ | 106 JNIEnv* xenv = thr->jni_environment(); \ |
107 if (env != xenv) { \ | 107 if (env != xenv) { \ |
108 NativeReportJNIFatalError(thr, warn_wrong_jnienv); \ | 108 NativeReportJNIFatalError(thr, warn_wrong_jnienv); \ |
182 | 182 |
183 static inline void | 183 static inline void |
184 functionEnter(JavaThread* thr) | 184 functionEnter(JavaThread* thr) |
185 { | 185 { |
186 if (thr->in_critical()) { | 186 if (thr->in_critical()) { |
187 tty->print_cr(warn_other_function_in_critical); | 187 tty->print_cr("%s", warn_other_function_in_critical); |
188 } | 188 } |
189 if (thr->has_pending_exception()) { | 189 if (thr->has_pending_exception()) { |
190 NativeReportJNIWarning(thr, "JNI call made with exception pending"); | 190 NativeReportJNIWarning(thr, "JNI call made with exception pending"); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 static inline void | 194 static inline void |
195 functionEnterExceptionAllowed(JavaThread* thr) | 195 functionEnterExceptionAllowed(JavaThread* thr) |
196 { | 196 { |
197 if (thr->in_critical()) { | 197 if (thr->in_critical()) { |
198 tty->print_cr(warn_other_function_in_critical); | 198 tty->print_cr("%s", warn_other_function_in_critical); |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 static inline void | 202 static inline void |
203 functionExit(JNIEnv *env) | 203 functionExit(JNIEnv *env) |