Skip to content

Commit 0dca784

Browse files
committed
Work around some JS miscompilation
1 parent f30d5f2 commit 0dca784

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kotlinx-coroutines-core/common/src/internal/DispatchedContinuation.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ internal fun DispatchedContinuation<Unit>.yieldUndispatched(): Boolean =
290290
* [doYield] indicates whether current continuation is yielding (to provide fast-path if event-loop is empty).
291291
* Returns `true` if execution of continuation was queued (trampolined) or `false` otherwise.
292292
*/
293-
private fun DispatchedContinuation<*>.executeUnconfined(
293+
@Suppress("NOTHING_TO_INLINE")
294+
private inline fun DispatchedContinuation<*>.executeUnconfined(
294295
contState: Any?, mode: Int, doYield: Boolean = false,
295-
block: () -> Unit
296+
noinline block: () -> Unit
296297
): Boolean {
297298
assert { mode != MODE_UNINITIALIZED } // invalid execution mode
298299
val eventLoop = ThreadLocalEventLoop.unconfinedEventLoop

0 commit comments

Comments
 (0)