Commit e79e0270 by Gary Benson Committed by Gary Benson

VMAccessController.java (pushContext, [...]): Use Thread.currentThread() to…

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
parent 4192d75b
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.
2006-08-06 Tom Tromey <tromey@redhat.com> 2006-08-06 Tom Tromey <tromey@redhat.com>
PR libgcj/28491: PR libgcj/28491:
......
...@@ -103,7 +103,7 @@ final class VMAccessController ...@@ -103,7 +103,7 @@ final class VMAccessController
*/ */
static void pushContext (AccessControlContext acc) static void pushContext (AccessControlContext acc)
{ {
if (!runtimeInitialized()) if (Thread.currentThread() == null)
return; return;
if (DEBUG) if (DEBUG)
...@@ -127,7 +127,7 @@ final class VMAccessController ...@@ -127,7 +127,7 @@ final class VMAccessController
*/ */
static void popContext() static void popContext()
{ {
if (!runtimeInitialized()) if (Thread.currentThread() == null)
return; return;
if (DEBUG) if (DEBUG)
...@@ -161,7 +161,7 @@ final class VMAccessController ...@@ -161,7 +161,7 @@ final class VMAccessController
// so that any security checks succeed. // so that any security checks succeed.
// //
// XXX this might not be necessary, but it seems prudent. // XXX this might not be necessary, but it seems prudent.
if (!runtimeInitialized()) if (Thread.currentThread() == null)
return DEFAULT_CONTEXT; return DEFAULT_CONTEXT;
// If we are already in getContext, but called a method that needs // If we are already in getContext, but called a method that needs
...@@ -284,11 +284,4 @@ final class VMAccessController ...@@ -284,11 +284,4 @@ final class VMAccessController
* of Strings comprising the method names. * of Strings comprising the method names.
*/ */
private static native Object[][] getStack(); private static native Object[][] getStack();
/**
* Tell whether runtime initialization is complete.
*
* @return whether runtime initialization is complete.
*/
private static native boolean runtimeInitialized();
} }
...@@ -22,9 +22,3 @@ java::security::VMAccessController::getStack () ...@@ -22,9 +22,3 @@ java::security::VMAccessController::getStack ()
_Jv_StackTrace *trace = _Jv_StackTrace::GetStackTrace (); _Jv_StackTrace *trace = _Jv_StackTrace::GetStackTrace ();
return _Jv_StackTrace::GetClassMethodStack (trace); return _Jv_StackTrace::GetClassMethodStack (trace);
} }
jboolean
java::security::VMAccessController::runtimeInitialized ()
{
return gcj::runtimeInitialized;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment