src/share/vm/oops/instanceKlass.cpp

changeset 4693
872b3feace55
parent 4572
927a311d00f9
child 4714
35ef86296a5d
     1.1 --- a/src/share/vm/oops/instanceKlass.cpp	Tue Mar 05 08:17:18 2013 -0800
     1.2 +++ b/src/share/vm/oops/instanceKlass.cpp	Tue Mar 05 18:03:36 2013 -0800
     1.3 @@ -2170,7 +2170,11 @@
     1.4        if (impl != NULL) {
     1.5          if (!impl->is_loader_alive(is_alive)) {
     1.6            // remove this guy
     1.7 -          *adr_implementor() = NULL;
     1.8 +          Klass** klass = adr_implementor();
     1.9 +          assert(klass != NULL, "null klass");
    1.10 +          if (klass != NULL) {
    1.11 +            *klass = NULL;
    1.12 +          }
    1.13          }
    1.14        }
    1.15      }
    1.16 @@ -3151,9 +3155,10 @@
    1.17    if (protection_domain() != NULL) {
    1.18      guarantee(protection_domain()->is_oop(), "should be oop");
    1.19    }
    1.20 -  if (host_klass() != NULL) {
    1.21 -    guarantee(host_klass()->is_metadata(), "should be in metaspace");
    1.22 -    guarantee(host_klass()->is_klass(), "should be klass");
    1.23 +  const Klass* host = host_klass();
    1.24 +  if (host != NULL) {
    1.25 +    guarantee(host->is_metadata(), "should be in metaspace");
    1.26 +    guarantee(host->is_klass(), "should be klass");
    1.27    }
    1.28    if (signers() != NULL) {
    1.29      guarantee(signers()->is_objArray(), "should be obj array");

mercurial