diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-21 01:54:06 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-21 01:54:06 +0000 |
commit | 3ab7414327e49315d676453c4dda0cbf3a30ddc4 (patch) | |
tree | dceb21b9cf452ee4920e5a2a6465e98ae9cd868c /libjava/include | |
parent | daed4e8fd05b3b6a0d6056d76fd9d29c1197ced2 (diff) | |
download | gcc-3ab7414327e49315d676453c4dda0cbf3a30ddc4.tar.gz |
* java/lang/Runtime.java: Comment fix.
* java/lang/ClassLoader.java (isAncestorOf): New method.
(getParent): Uncommented security check. Use isAncestorOf.
* include/jvm.h (_Jv_CheckAccess): Declare.
* java/lang/reflect/natConstructor.cc (newInstance): Perform
access check.
Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h.
* java/lang/reflect/natArray.cc (newInstance): Pass caller's
class loader to _Jv_GetArrayClass.
Include ArrayIndexOutOfBoundsException.h.
* java/lang/reflect/Field.java: Update comment to reflect status.
(equals): Fixed indentation.
* java/lang/Class.h (Class): Declare memberAccessCheck, not
checkMemberAccess. Make _Jv_CheckAccess a friend.
* java/lang/Class.java (memberAccessCheck): New method from
Classpath.
(checkMemberAccess): Removed.
(getDeclaredMethod): Use memberAccessCheck.
(getField): Likewise.
(getMethod): Likewise.
* resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess.
(_Jv_SearchMethodInClass): Likewise.
* prims.cc (_Jv_CheckAccess): New function.
* jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal.
(_Jv_JNI_GetAnyFieldID): Likewise.
* java/lang/natClass.cc (forName): Use getClassLoaderInternal.
(getClassLoader): Added security check.
(getConstructor): Call memberAccessCheck.
(getDeclaredClasses): Likewise.
(getDeclaredField): Likewise.
(getDeclaredFields): Likewise.
(_getConstructors): Likewise.
(getDeclaredConstructor): Likewise.
(getDeclaredMethods): Likewise.
(getFields): Likewise.
(getMethods): Likewise.
(newInstance): Likewise.
(_Jv_MakeVTable): Put method name in exception.
* java/lang/reflect/natMethod.cc (getType): Use
getClassLoaderInternal.
(_Jv_GetTypesFromSignature): Likewise.
(invoke): Perform access check.
(_Jv_CallAnyMethodA): Removed old FIXME comments.
Include ArrayIndexOutOfBoundsException.h.
* java/lang/reflect/natField.cc (getType): Use
getClassLoaderInternal.
(_Jv_CheckFieldAccessibility): Removed.
(getAddr): Use _Jv_CheckAccess; find caller.
Include ArrayIndexOutOfBoundsException.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/jvm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 9395feb09c4..38155d3a3ec 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -1,6 +1,6 @@ // jvm.h - Header file for private implementation information. -*- c++ -*- -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. @@ -326,6 +326,9 @@ extern void _Jv_GetTypesFromSignature (jmethodID method, JArray<jclass> **arg_types_out, jclass *return_type_out); +extern jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass, + jint flags); + extern jobject _Jv_CallAnyMethodA (jobject obj, jclass return_type, jmethodID meth, jboolean is_constructor, JArray<jclass> *parameter_types, |