fix: some more wrapper issues
This commit is contained in:
parent
0ac7af2ea3
commit
d38b600366
@ -9,8 +9,13 @@ public class NativeWrapper extends ObjectValue {
|
|||||||
@Override
|
@Override
|
||||||
public ObjectValue getPrototype(Context ctx) {
|
public ObjectValue getPrototype(Context ctx) {
|
||||||
if (ctx.environment != null && prototype == NATIVE_PROTO) {
|
if (ctx.environment != null && prototype == NATIVE_PROTO) {
|
||||||
var res = ctx.environment.wrappers.getProto(wrapped.getClass());
|
var clazz = wrapped.getClass();
|
||||||
if (res != null) return res;
|
|
||||||
|
while (true) {
|
||||||
|
var res = ctx.environment.wrappers.getProto(clazz);
|
||||||
|
if (res != null) return res;
|
||||||
|
clazz = clazz.getSuperclass();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.getPrototype(ctx);
|
return super.getPrototype(ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user