< prev index next >

src/hotspot/share/runtime/jniHandles.cpp

Print this page
rev 58072 : [mq]: v2

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -263,12 +263,11 @@
   assert(handle != NULL, "precondition");
   // If there is no java frame, then this must be top level code, such
   // as the java command executable, in which case, this type of handle
   // is not permitted.
   return (thr->has_last_Java_frame() &&
-         (void*)handle < (void*)thr->stack_base() &&
-         (void*)handle >= (void*)thr->last_Java_sp());
+          thr->is_in_stack_range_incl((address)handle, (address)thr->last_Java_sp()));
 }
 
 
 bool JNIHandles::is_global_handle(jobject handle) {
   assert(handle != NULL, "precondition");
< prev index next >