Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp Thu Aug 01 00:35:13 2013 +0200 +++ b/src/share/vm/prims/jvm.cpp Thu Aug 01 00:38:28 2013 +0200 @@ -1122,6 +1122,17 @@ return (jobject) JNIHandles::make_local(env, pd); JVM_END +// Preserved in Graal repo so that linking against a JDK7 libjava.so works +JVM_ENTRY(void, JVM_SetProtectionDomain(JNIEnv *env, jclass cls, jobject protection_domain)) + JVMWrapper("JVM_SetProtectionDomain"); + + ResourceMark rm(THREAD); + const char* msg = "Obsolete JVM_SetProtectionDomain function called"; + size_t buflen = strlen(msg); + char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); + jio_snprintf(buf, buflen, msg); + THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); +JVM_END static bool is_authorized(Handle context, instanceKlassHandle klass, TRAPS) { // If there is a security manager and protection domain, check the access