From df299f35649f6cdad5aacf991cd0740ccaeb120e Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 5 Nov 2010 15:34:28 -0600 Subject: [PATCH] fix build against latest JRE 1.6.0_22 This commit accomodates a new field in java.lang.Thread and implements JVM_FindClassFromBootLoader. --- src/classpath-openjdk.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index f3eb91ec59..d2b3f131cc 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -298,14 +298,18 @@ class MyClasspath : public Classpath { if (parent) { group = threadGroup(t, parent->javaThread); } else { - group = makeThreadGroup - (t, 0, 0, MaxPriority, false, false, false, 0, 0, 0, 0, 0); + group = allocate(t, FixedSizeOfThreadGroup, true); + setObjectClass(t, group, type(t, Machine::ThreadGroupType)); + threadGroupMaxPriority(t, group) = MaxPriority; } + + object thread = allocate(t, FixedSizeOfThread, true); + setObjectClass(t, thread, type(t, Machine::ThreadType)); + threadPriority(t, thread) = NormalPriority; + threadGroup(t, thread) = group; + threadContextClassLoader(t, thread) = root(t, Machine::BootLoader); - return vm::makeThread - (t, 0, NormalPriority, 0, 0, false, false, false, 0, group, - root(t, Machine::BootLoader), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false, 0, 0, - 0, 0, false); + return thread; } virtual void @@ -1869,6 +1873,12 @@ JVM_FindClassFromClassLoader(Thread* t, const char* name, jboolean init, return makeLocalReference(t, getJClass(t, c)); } +extern "C" JNIEXPORT jclass JNICALL +JVM_FindClassFromBootLoader(Thread* t, const char* name, jboolean throwError) +{ + return JVM_FindClassFromClassLoader(t, name, false, 0, throwError); +} + extern "C" JNIEXPORT jclass JNICALL JVM_FindClassFromClass(Thread*, const char*, jboolean, jclass) { abort(); }