Mercurial > hg > graal-jvmci-8
changeset 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 | 52dd54de4e74 |
children | 0630959b64e8 |
files | make/bsd/makefiles/mapfile-vers-debug make/bsd/makefiles/mapfile-vers-product make/linux/makefiles/mapfile-vers-debug make/linux/makefiles/mapfile-vers-product src/share/vm/prims/jvm.cpp src/share/vm/prims/jvm.h |
diffstat | 6 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/make/bsd/makefiles/mapfile-vers-debug Thu Aug 01 00:35:13 2013 +0200 +++ b/make/bsd/makefiles/mapfile-vers-debug Thu Aug 01 00:38:28 2013 +0200 @@ -221,6 +221,8 @@ _JVM_SetLength _JVM_SetNativeThreadName _JVM_SetPrimitiveArrayElement + # Preserved so that Graal repo can link against a JDK7 libjava.so works + _JVM_SetProtectionDomain _JVM_SetSockOpt _JVM_SetThreadPriority _JVM_Sleep
--- a/make/bsd/makefiles/mapfile-vers-product Thu Aug 01 00:35:13 2013 +0200 +++ b/make/bsd/makefiles/mapfile-vers-product Thu Aug 01 00:38:28 2013 +0200 @@ -221,6 +221,8 @@ _JVM_SetLength _JVM_SetNativeThreadName _JVM_SetPrimitiveArrayElement + # Preserved so that Graal repo can link against a JDK7 libjava.so works + _JVM_SetProtectionDomain _JVM_SetSockOpt _JVM_SetThreadPriority _JVM_Sleep
--- a/make/linux/makefiles/mapfile-vers-debug Thu Aug 01 00:35:13 2013 +0200 +++ b/make/linux/makefiles/mapfile-vers-debug Thu Aug 01 00:38:28 2013 +0200 @@ -223,6 +223,8 @@ JVM_SetLength; JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; + # Preserved so that Graal repo can link against a JDK7 libjava.so works + JVM_SetProtectionDomain; JVM_SetSockOpt; JVM_SetThreadPriority; JVM_Sleep;
--- a/make/linux/makefiles/mapfile-vers-product Thu Aug 01 00:35:13 2013 +0200 +++ b/make/linux/makefiles/mapfile-vers-product Thu Aug 01 00:38:28 2013 +0200 @@ -223,6 +223,8 @@ JVM_SetLength; JVM_SetNativeThreadName; JVM_SetPrimitiveArrayElement; + # Preserved so that Graal repo can link against a JDK7 libjava.so works + JVM_SetProtectionDomain; JVM_SetSockOpt; JVM_SetThreadPriority; JVM_Sleep;
--- 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
--- a/src/share/vm/prims/jvm.h Thu Aug 01 00:35:13 2013 +0200 +++ b/src/share/vm/prims/jvm.h Thu Aug 01 00:38:28 2013 +0200 @@ -474,6 +474,11 @@ JNIEXPORT jboolean JNICALL JVM_IsArrayClass(JNIEnv *env, jclass cls); +// Preserved in Graal repo so that linking against a JDK7 libjava.so works +JNIEXPORT void JNICALL +JVM_SetProtectionDomain(JNIEnv *env, jclass cls, jobject protection_domain); + + JNIEXPORT jboolean JNICALL JVM_IsPrimitiveClass(JNIEnv *env, jclass cls);