diff options
author | Gary Benson <gbenson@redhat.com> | 2006-08-07 14:14:14 +0000 |
---|---|---|
committer | Gary Benson <gary@gcc.gnu.org> | 2006-08-07 14:14:14 +0000 |
commit | e79e0270c06080eaff1f06afd485beee53626090 (patch) | |
tree | a0e8041987e27207442a829d6043b63c48192368 /libjava/java | |
parent | 4192d75b251845c010da43f83c5ff6c815159dd4 (diff) | |
download | gcc-e79e0270c06080eaff1f06afd485beee53626090.zip gcc-e79e0270c06080eaff1f06afd485beee53626090.tar.gz gcc-e79e0270c06080eaff1f06afd485beee53626090.tar.bz2 |
VMAccessController.java (pushContext, [...]): Use Thread.currentThread() to determine when we're bootstrapping.
2006-08-07 Gary Benson <gbenson@redhat.com>
* java/security/VMAccessController.java (pushContext, popContext,
getContext): Use Thread.currentThread() to determine when we're
bootstrapping.
(runtimeInitialized): Remove.
* java/security/natVMAccessController.cc (runtimeInitialized):
Remove.
From-SVN: r115996
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/security/VMAccessController.java | 13 | ||||
-rw-r--r-- | libjava/java/security/natVMAccessController.cc | 6 |
2 files changed, 3 insertions, 16 deletions
diff --git a/libjava/java/security/VMAccessController.java b/libjava/java/security/VMAccessController.java index dfbd16f..c394753 100644 --- a/libjava/java/security/VMAccessController.java +++ b/libjava/java/security/VMAccessController.java @@ -103,7 +103,7 @@ final class VMAccessController */ static void pushContext (AccessControlContext acc) { - if (!runtimeInitialized()) + if (Thread.currentThread() == null) return; if (DEBUG) @@ -127,7 +127,7 @@ final class VMAccessController */ static void popContext() { - if (!runtimeInitialized()) + if (Thread.currentThread() == null) return; if (DEBUG) @@ -161,7 +161,7 @@ final class VMAccessController // so that any security checks succeed. // // XXX this might not be necessary, but it seems prudent. - if (!runtimeInitialized()) + if (Thread.currentThread() == null) return DEFAULT_CONTEXT; // If we are already in getContext, but called a method that needs @@ -284,11 +284,4 @@ final class VMAccessController * of Strings comprising the method names. */ private static native Object[][] getStack(); - - /** - * Tell whether runtime initialization is complete. - * - * @return whether runtime initialization is complete. - */ - private static native boolean runtimeInitialized(); } diff --git a/libjava/java/security/natVMAccessController.cc b/libjava/java/security/natVMAccessController.cc index 2550345..e56ccbd 100644 --- a/libjava/java/security/natVMAccessController.cc +++ b/libjava/java/security/natVMAccessController.cc @@ -22,9 +22,3 @@ java::security::VMAccessController::getStack () _Jv_StackTrace *trace = _Jv_StackTrace::GetStackTrace (); return _Jv_StackTrace::GetClassMethodStack (trace); } - -jboolean -java::security::VMAccessController::runtimeInitialized () -{ - return gcj::runtimeInitialized; -} |