hotspot/src/share/vm/ci/ciEnv.cpp
changeset 46327 91576389a517
parent 43938 f0e4bcc4d9f3
parent 46289 1904e7ec236e
child 46329 53ccc37bda19
equal deleted inserted replaced
44203:d2d435372329 46327:91576389a517
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   276     Klass* k = SystemDictionary::find(name, Handle(), Handle(), THREAD);
   276     Klass* k = SystemDictionary::find(name, Handle(), Handle(), THREAD);
   277     jobject objh = NULL;
   277     jobject objh = NULL;
   278     if (!HAS_PENDING_EXCEPTION && k != NULL) {
   278     if (!HAS_PENDING_EXCEPTION && k != NULL) {
   279       oop obj = InstanceKlass::cast(k)->allocate_instance(THREAD);
   279       oop obj = InstanceKlass::cast(k)->allocate_instance(THREAD);
   280       if (!HAS_PENDING_EXCEPTION)
   280       if (!HAS_PENDING_EXCEPTION)
   281         objh = JNIHandles::make_global(obj);
   281         objh = JNIHandles::make_global(Handle(THREAD, obj));
   282     }
   282     }
   283     if (HAS_PENDING_EXCEPTION) {
   283     if (HAS_PENDING_EXCEPTION) {
   284       CLEAR_PENDING_EXCEPTION;
   284       CLEAR_PENDING_EXCEPTION;
   285     } else {
   285     } else {
   286       handle = objh;
   286       handle = objh;
   374     // Find the element klass, if this is an array.
   374     // Find the element klass, if this is an array.
   375     resolved_klass = ObjArrayKlass::cast(resolved_klass)->bottom_klass();
   375     resolved_klass = ObjArrayKlass::cast(resolved_klass)->bottom_klass();
   376   }
   376   }
   377   if (resolved_klass->is_instance_klass()) {
   377   if (resolved_klass->is_instance_klass()) {
   378     return (Reflection::verify_class_access(accessing_klass->get_Klass(),
   378     return (Reflection::verify_class_access(accessing_klass->get_Klass(),
   379                                             resolved_klass,
   379                                             InstanceKlass::cast(resolved_klass),
   380                                             true) == Reflection::ACCESS_OK);
   380                                             true) == Reflection::ACCESS_OK);
   381   }
   381   }
   382   return true;
   382   return true;
   383 }
   383 }
   384 
   384