优化
This commit is contained in:
@@ -92,7 +92,7 @@ internal class JavaAdapter private constructor(private val engine: Invocable) :
|
|||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@Throws(RhinoException::class)
|
@Throws(RhinoException::class)
|
||||||
fun init(cx: Context?, scope: Scriptable, sealed: Boolean) {
|
fun init(cx: Context, scope: Scriptable, sealed: Boolean) {
|
||||||
val topLevel = scope as RhinoTopLevel
|
val topLevel = scope as RhinoTopLevel
|
||||||
val engine: Invocable = topLevel.scriptEngine
|
val engine: Invocable = topLevel.scriptEngine
|
||||||
val obj = JavaAdapter(engine)
|
val obj = JavaAdapter(engine)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import java.security.AccessControlContext
|
|||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
class RhinoTopLevel internal constructor(cx: Context?, val scriptEngine: RhinoScriptEngine) :
|
class RhinoTopLevel(cx: Context, val scriptEngine: RhinoScriptEngine) :
|
||||||
ImporterTopLevel(cx, System.getSecurityManager() != null) {
|
ImporterTopLevel(cx, System.getSecurityManager() != null) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
Reference in New Issue
Block a user