Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: class.c 8339 2007-08-17 21:21:51Z twisti $
+ $Id: class.c 8387 2007-08-21 15:37:47Z twisti $
*/
*******************************************************************************/
-classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data)
+classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data, java_handle_t *pd)
{
classinfo *c;
classinfo *r;
return NULL;
}
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_SUN)
+ /* Store the protection domain. */
+
+ c->protectiondomain = pd;
+# endif
+#endif
+
/* Store the newly defined class in the class cache. This call
also checks whether a class of the same name has already been
defined by the same defining loader, and if so, replaces the
if (c->super.any == NULL)
return NULL;
- /* Do we have a super class reference or is it already
- resolved? */
+ /* Check if the super class is a reference. */
if (IS_CLASSREF(c->super)) {
+ /* XXX I'm very sure this is not correct. */
super = resolve_classref_or_classinfo_eager(c->super, true);
+/* super = resolve_classref_or_classinfo_eager(c->super, false); */
if (super == NULL)
return NULL;
if (sub == super)
return true;
- sub = class_resolve_superclass(sub);
+/* sub = class_resolve_superclass(sub); */
+ if (sub->super.any == NULL)
+ return false;
+
+ assert(IS_CLASSREF(sub->super) == 0);
+
+ sub = sub->super.cls;
}
}