8151728: jni test crashes JVM assert(_handle != __null) failed: resolving NULL handle

New assert needs to check for null.

Reviewed-by: hseigel, gtriantafill
This commit is contained in:
Coleen Phillimore 2016-03-12 07:23:20 -05:00
parent edd3f7ca77
commit f582dd7616

View file

@ -1687,7 +1687,7 @@ class BacktraceIterator : public StackObj {
public:
BacktraceIterator(objArrayHandle result, Thread* thread) {
init(result, thread);
assert(_methods->length() == java_lang_Throwable::trace_chunk_size, "lengths don't match");
assert(_methods.is_null() || _methods->length() == java_lang_Throwable::trace_chunk_size, "lengths don't match");
}
BacktraceElement next(Thread* thread) {