Merge remote-tracking branch 'origin/master'

This commit is contained in:
kunfei
2023-03-25 13:06:20 +08:00
5 changed files with 27 additions and 16 deletions
@@ -164,6 +164,7 @@ class RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable {
val newScope: Scriptable = ExternalScriptable(ctxt, indexedProps)
newScope.prototype = topLevel
newScope.put("context", newScope, ctxt)
/*
val cx = Context.enter()
try {
@Language("js")
@@ -195,6 +196,7 @@ class RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable {
} finally {
Context.exit()
}
*/
newScope
}
}
@@ -303,6 +305,7 @@ class RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable {
private const val DEBUG = false
/*
@Language("js")
private val printSource = """
function print(str, newline) {
@@ -322,6 +325,7 @@ class RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable {
print(str, true);
}
""".trimIndent()
*/
init {
ContextFactory.initGlobal(object : ContextFactory() {