Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jvm.cpp @ 11175:e636d62005c3
restored JVM_SetProtectionDomain so that Graal still works with libjava.so from JDK7 (which expects this function to be defined)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 01 Aug 2013 00:38:28 +0200 |
parents | 6b0fd0964b87 |
children | cefad50507d8 |
comparison
equal
deleted
inserted
replaced
11174:52dd54de4e74 | 11175:e636d62005c3 |
---|---|
1120 | 1120 |
1121 oop pd = java_lang_Class::protection_domain(JNIHandles::resolve(cls)); | 1121 oop pd = java_lang_Class::protection_domain(JNIHandles::resolve(cls)); |
1122 return (jobject) JNIHandles::make_local(env, pd); | 1122 return (jobject) JNIHandles::make_local(env, pd); |
1123 JVM_END | 1123 JVM_END |
1124 | 1124 |
1125 // Preserved in Graal repo so that linking against a JDK7 libjava.so works | |
1126 JVM_ENTRY(void, JVM_SetProtectionDomain(JNIEnv *env, jclass cls, jobject protection_domain)) | |
1127 JVMWrapper("JVM_SetProtectionDomain"); | |
1128 | |
1129 ResourceMark rm(THREAD); | |
1130 const char* msg = "Obsolete JVM_SetProtectionDomain function called"; | |
1131 size_t buflen = strlen(msg); | |
1132 char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); | |
1133 jio_snprintf(buf, buflen, msg); | |
1134 THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); | |
1135 JVM_END | |
1125 | 1136 |
1126 static bool is_authorized(Handle context, instanceKlassHandle klass, TRAPS) { | 1137 static bool is_authorized(Handle context, instanceKlassHandle klass, TRAPS) { |
1127 // If there is a security manager and protection domain, check the access | 1138 // If there is a security manager and protection domain, check the access |
1128 // in the protection domain, otherwise it is authorized. | 1139 // in the protection domain, otherwise it is authorized. |
1129 if (java_lang_System::has_security_manager()) { | 1140 if (java_lang_System::has_security_manager()) { |