Fix bug 456546: Accept subclasses as argument to java method with o.m.j.Scriptable argument

git-svn-id: svn://10.0.0.236/trunk@254826 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hannes%helma.at
2008-10-30 12:34:29 +00:00
parent eaa6111718
commit 4e39e7feba

View File

@@ -370,7 +370,7 @@ WrapFactory#wrap(Context, Scriptable, Object, Class)}
case JSTYPE_OBJECT:
// Other objects takes #1-#3 spots
if (to == fromObj.getClass()) {
if (to.isInstance(fromObj)) {
// No conversion required
return 1;
}