This commit is contained in:
Horis committed 2025-04-14 12:46:06 +08:00
1 parent 07162997a5
commit 37cd97c451
7 files changed
+151 -38

No files matched your search

@@ -11,6 +11,12 @@ import kotlin.coroutines.ContinuationInterceptor
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.coroutineContext
val rhinoContext: RhinoContext
get() = Context.getCurrentContext() as RhinoContext
val rhinoContextOrNull: RhinoContext?
get() = Context.getCurrentContext() as? RhinoContext
@Suppress("LEAKED_IN_PLACE_LAMBDA", "WRONG_INVOCATION_KIND")
@OptIn(ExperimentalContracts::class)
inline fun <T> suspendContinuation(crossinline block: suspend CoroutineScope.() -> T): T {