src/share/vm/classfile/classFileParser.cpp

changeset 9969
40f45911050f
parent 9859
7d05a422d710
child 10012
73d58f4c918a
equal deleted inserted replaced
9968:9a8c9d2291bb 9969:40f45911050f
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 }
3720 3730
3721 instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name, 3731 instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
3722 ClassLoaderData* loader_data, 3732 ClassLoaderData* loader_data,
3723 Handle protection_domain, 3733 Handle protection_domain,
3724 KlassHandle host_klass, 3734 KlassHandle host_klass,
3861 _minor_version = minor_version; 3871 _minor_version = minor_version;
3862 3872
3863 3873
3864 // Check if verification needs to be relaxed for this class file 3874 // Check if verification needs to be relaxed for this class file
3865 // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376) 3875 // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376)
3866 _relax_verify = Verifier::relax_verify_for(class_loader()); 3876 _relax_verify = relax_format_check_for(_loader_data);
3867 3877
3868 // Constant pool 3878 // Constant pool
3869 constantPoolHandle cp = parse_constant_pool(CHECK_(nullHandle)); 3879 constantPoolHandle cp = parse_constant_pool(CHECK_(nullHandle));
3870 3880
3871 int cp_size = cp->length(); 3881 int cp_size = cp->length();

mercurial