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
This commit is contained in:
Gary Benson 2006-08-07 14:14:14 +00:00 committed by Gary Benson
parent 4192d75b25
commit e79e0270c0
3 changed files with 12 additions and 16 deletions

View File

@ -1,3 +1,12 @@
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>
PR libgcj/28491:

View File

@ -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();
}

View File

@ -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;
}