Fix freeze during loading script configurations through legacy scripting API
Do not wrap the whole configuration loading process into readAction ^KT-39771 Fixed
This commit is contained in:
+3
-5
@@ -61,11 +61,9 @@ open class DefaultScriptConfigurationLoader(val project: Project) : ScriptConfig
|
||||
|
||||
val inputs = getInputsStamp(vFile, file)
|
||||
val scriptingApiResult = try {
|
||||
runReadAction {
|
||||
refineScriptCompilationConfiguration(
|
||||
KtFileScriptSource(file), scriptDefinition, file.project
|
||||
)
|
||||
}
|
||||
refineScriptCompilationConfiguration(
|
||||
KtFileScriptSource(file), scriptDefinition, file.project
|
||||
)
|
||||
} catch (e: Throwable) {
|
||||
if (e is ControlFlowException) throw e
|
||||
|
||||
|
||||
Reference in New Issue
Block a user