revert: 回退rhino版本至1.8.1,移除1.9.1适配代码

- rhino 1.9.1 → 1.8.1
- VMBridgeReflect: 移除Context/ContextFactory fallback,恢复VMBridge反射
- ReadOnlyJavaObject/NativeBaseSource: 移除TypeInfoFactory适配,恢复Class<*>?构造
@
This commit is contained in:
HapeLee
2026-05-31 22:03:33 +08:00
parent c63cf8921d
commit 6cc229d9b9
4 changed files with 13 additions and 26 deletions
@@ -3,10 +3,9 @@ package io.legado.app.help.rhino
import com.script.rhino.JavaObjectWrapFactory
import org.mozilla.javascript.NativeJavaObject
import org.mozilla.javascript.Scriptable
import org.mozilla.javascript.lc.type.TypeInfoFactory
class NativeBaseSource(scope: Scriptable?, javaObject: Any, staticType: Class<*>?) :
NativeJavaObject(scope, javaObject, staticType?.let { TypeInfoFactory.GLOBAL.create(it) }) {
NativeJavaObject(scope, javaObject, staticType) {
override fun has(name: String, start: Scriptable): Boolean {
if (name != "setVariable" && name.length > 3 && name.startsWith("set")) {