summaryrefslogtreecommitdiff
path: root/libjava/java/lang/natVMSecurityManager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/natVMSecurityManager.cc')
-rw-r--r--libjava/java/lang/natVMSecurityManager.cc33
1 files changed, 4 insertions, 29 deletions
diff --git a/libjava/java/lang/natVMSecurityManager.cc b/libjava/java/lang/natVMSecurityManager.cc
index 8fd2875aedc..d55b7a54c3a 100644
--- a/libjava/java/lang/natVMSecurityManager.cc
+++ b/libjava/java/lang/natVMSecurityManager.cc
@@ -12,43 +12,18 @@ details. */
#include <gcj/cni.h>
#include <jvm.h>
+#include <java-stack.h>
+
#include <java/lang/VMSecurityManager.h>
#include <java/lang/SecurityManager.h>
#include <java/lang/ClassLoader.h>
#include <java/lang/Class.h>
-#include <gnu/gcj/runtime/StackTrace.h>
JArray<jclass> *
java::lang::VMSecurityManager::getClassContext ()
{
- JArray<jclass> *result = NULL;
- gnu::gcj::runtime::StackTrace *t = new gnu::gcj::runtime::StackTrace();
- if (t)
- {
- int maxlen = t->length();
-
- int len = 0;
- for (int i=0; i<maxlen; i++)
- {
- jclass klass = t->classAt(i);
- if (klass != NULL && klass != &java::lang::VMSecurityManager::class$
- && klass != &java::lang::SecurityManager::class$)
- ++len;
- }
-
- result =
- (JArray<jclass> *) _Jv_NewObjectArray (len, &java::lang::Class::class$,
- NULL);
-
- len = 0;
- for (int i=0; i<maxlen; i++)
- {
- jclass klass = t->classAt(i);
- if (klass != NULL && klass != &java::lang::VMSecurityManager::class$
- && klass != &java::lang::SecurityManager::class$)
- elements(result)[len++] = klass;
- }
- }
+ JArray<jclass> *result =
+ _Jv_StackTrace::GetClassContext (&SecurityManager::class$);
return result;
}