Skip to content

Commit d0aa7fc

Browse files
committed
Work around some JS miscompilation
1 parent 045e52f commit d0aa7fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: kotlinx-coroutines-core/common/src/internal/DispatchedContinuation.kt

+3-2
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)