--- a/src/hotspot/share/oops/method.cpp Mon Jul 30 14:08:30 2018 -0400
+++ b/src/hotspot/share/oops/method.cpp Mon Jul 30 16:35:54 2018 -0400
@@ -1095,7 +1095,7 @@
}
void Method::restore_unshareable_info(TRAPS) {
- assert(is_method() && is_valid_method(), "ensure C++ vtable is restored");
+ assert(is_method() && is_valid_method(this), "ensure C++ vtable is restored");
// Since restore_unshareable_info can be called more than once for a method, don't
// redo any work.
@@ -2166,16 +2166,16 @@
}
// Check that this pointer is valid by checking that the vtbl pointer matches
-bool Method::is_valid_method() const {
- if (this == NULL) {
+bool Method::is_valid_method(const Method* m) {
+ if (m == NULL) {
return false;
- } else if ((intptr_t(this) & (wordSize-1)) != 0) {
+ } else if ((intptr_t(m) & (wordSize-1)) != 0) {
// Quick sanity check on pointer.
return false;
- } else if (is_shared()) {
- return MetaspaceShared::is_valid_shared_method(this);
- } else if (Metaspace::contains_non_shared(this)) {
- return has_method_vptr((const void*)this);
+ } else if (m->is_shared()) {
+ return MetaspaceShared::is_valid_shared_method(m);
+ } else if (Metaspace::contains_non_shared(m)) {
+ return has_method_vptr((const void*)m);
} else {
return false;
}