mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.script
|
||||
|
||||
import org.mozilla.javascript.Context
|
||||
import org.mozilla.javascript.ContextFactory
|
||||
|
||||
open class RhinoContextFactory : ContextFactory() {
|
||||
|
||||
override fun hasFeature(cx: Context, featureIndex: Int): Boolean {
|
||||
return when (featureIndex) {
|
||||
Context.FEATURE_ENABLE_JAVA_MAP_ACCESS -> true
|
||||
else -> super.hasFeature(cx, featureIndex)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,7 +51,7 @@ object RhinoClassShutter : ClassShutter {
|
||||
if (i != -1) {
|
||||
try {
|
||||
sm.checkPackageAccess(fullClassName.substring(0, i))
|
||||
} catch (var5: SecurityException) {
|
||||
} catch (e: SecurityException) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user