src/share/vm/classfile/classFileParser.cpp

changeset 10012
73d58f4c918a
parent 9969
40f45911050f
child 10013
7ab1cd9c7843
equal deleted inserted replaced
10011:c49a13526ba9 10012:73d58f4c918a
3715 info->static_field_size = static_field_size; 3715 info->static_field_size = static_field_size;
3716 info->nonstatic_field_size = nonstatic_field_size; 3716 info->nonstatic_field_size = nonstatic_field_size;
3717 info->has_nonstatic_fields = has_nonstatic_fields; 3717 info->has_nonstatic_fields = has_nonstatic_fields;
3718 } 3718 }
3719 3719
3720 static bool relax_format_check_for(ClassLoaderData* loader_data) {
3721 bool trusted = (loader_data->is_the_null_class_loader_data() ||
3722 SystemDictionary::is_ext_class_loader(loader_data->class_loader()));
3723 bool need_verify =
3724 // verifyAll
3725 (BytecodeVerificationLocal && BytecodeVerificationRemote) ||
3726 // verifyRemote
3727 (!BytecodeVerificationLocal && BytecodeVerificationRemote && !trusted);
3728 return !need_verify;
3729 }
3730 3720
3731 instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name, 3721 instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
3732 ClassLoaderData* loader_data, 3722 ClassLoaderData* loader_data,
3733 Handle protection_domain, 3723 Handle protection_domain,
3734 KlassHandle host_klass, 3724 KlassHandle host_klass,
3871 _minor_version = minor_version; 3861 _minor_version = minor_version;
3872 3862
3873 3863
3874 // Check if verification needs to be relaxed for this class file 3864 // Check if verification needs to be relaxed for this class file
3875 // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376) 3865 // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376)
3876 _relax_verify = relax_format_check_for(_loader_data); 3866 _relax_verify = Verifier::relax_verify_for(class_loader());
3877 3867
3878 // Constant pool 3868 // Constant pool
3879 constantPoolHandle cp = parse_constant_pool(CHECK_(nullHandle)); 3869 constantPoolHandle cp = parse_constant_pool(CHECK_(nullHandle));
3880 3870
3881 int cp_size = cp->length(); 3871 int cp_size = cp->length();

mercurial