[remote-driver] JCef support: do not use runBlockingCancelable

GitOrigin-RevId: 92ac3fc289e719287edb133cdaae845b7b025ce0
This commit is contained in:
eugene.nizienko
2024-03-01 16:03:07 +00:00
committed by intellij-monorepo-bot
parent 19988eb864
commit f91ae1ad6d
@@ -1,6 +1,5 @@
package com.jetbrains.performancePlugin.remotedriver.jcef
import com.intellij.openapi.progress.runBlockingCancellable
import com.intellij.ui.jcef.JBCefBrowserBase
import com.intellij.ui.jcef.JBCefJSQuery
import kotlinx.coroutines.*
@@ -29,7 +28,8 @@ internal class JcefComponentWrapper(private val component: Component) {
* @return the result of the JavaScript code execution
* @throws IllegalStateException if no result is received from the script within the specified timeout
*/
fun callJs(js: String, executeTimeoutMs: Long): String = runBlockingCancellable { jsExecutor.callJs(js, executeTimeoutMs) }
@Suppress("SSBasedInspection")
fun callJs(js: String, executeTimeoutMs: Long): String = runBlocking { jsExecutor.callJs(js, executeTimeoutMs) }
/**
* Finds the JBCefBrowserBase component associated with the given component.