This commit is contained in:
kunfei 2023-04-17 10:46:16 +08:00
parent a4fc1b10f5
commit 19840997bd

View File

@ -5,9 +5,8 @@ import org.mozilla.javascript.Context
object Rhino {
inline fun <R> use(block: Context.() -> R): R {
val context = Context.enter()
return try {
block.invoke(context)
block.invoke(Context.enter())
} finally {
Context.exit()
}