--- a/src/hotspot/share/oops/klass.hpp Mon Jun 25 02:07:42 2018 +0200
+++ b/src/hotspot/share/oops/klass.hpp Sun Jun 24 21:46:11 2018 -0700
@@ -640,6 +640,11 @@
// Klass is considered alive. Has already been marked as unloading.
bool is_loader_alive() const { return !class_loader_data()->is_unloading(); }
+ // Load the klass's holder as a phantom. This is useful when a weak Klass
+ // pointer has been "peeked" and then must be kept alive before it may
+ // be used safely.
+ oop holder_phantom() const;
+
static void clean_weak_klass_links(bool unloading_occurred, bool clean_alive_klasses = true);
static void clean_subklass_tree() {
clean_weak_klass_links(/*unloading_occurred*/ true , /* clean_alive_klasses */ false);