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