From 76a4b32c1f38c13300819c6ff5776c01dd3e2d32 Mon Sep 17 00:00:00 2001 From: Marco Pennekamp Date: Tue, 5 Dec 2023 21:03:40 +0100 Subject: [PATCH] [Test] JS backend recompilation tests: Dispose the test root disposable of the subordinate incremental configuration - The incremental configuration for JS recompilation tests creates its own test root disposable. It needs to be properly handled to avoid disposable leaks. - The incremental configuration's disposable is registered with the parent configuration's disposable because it lives in its scope and should thus not be a root disposable. It's also disposed at the end of `transform` because the incremental configuration's lifetime ends there. ^KT-64099 fixed --- .../CommonRecompileModuleJsBackendFacade.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/converters/incremental/CommonRecompileModuleJsBackendFacade.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/converters/incremental/CommonRecompileModuleJsBackendFacade.kt index 988d26b629a..4aea3e4a616 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/converters/incremental/CommonRecompileModuleJsBackendFacade.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/converters/incremental/CommonRecompileModuleJsBackendFacade.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.js.test.converters.incremental +import com.intellij.openapi.util.Disposer import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.TestInfrastructureInternals import org.jetbrains.kotlin.test.TestRunner @@ -50,6 +51,9 @@ abstract class CommonRecompileModuleJsBackendFacade