mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
LLM-12328 Use a plugin scope when running a ProjectActivity when listening for extensionAdded to avoid memory leaks
GitOrigin-RevId: 5ab2aeab3d9f3e1ce28dcd2a0e118321670da800
This commit is contained in:
committed by
intellij-monorepo-bot
parent
441dded643
commit
1b49c076d7
@@ -80,12 +80,14 @@ open class StartupManagerImpl(private val project: Project, private val coroutin
|
||||
val startupManager = getInstance(project) as StartupManagerImpl
|
||||
when (extension) {
|
||||
is ProjectActivity -> {
|
||||
startupManager.coroutineScope.launch {
|
||||
val pluginScope = createActivityScope(project, extension.javaClass)
|
||||
pluginScope.launch {
|
||||
extension.execute(project)
|
||||
}
|
||||
}
|
||||
is DumbAware -> {
|
||||
startupManager.coroutineScope.launch {
|
||||
val pluginScope = createActivityScope(project, extension.javaClass)
|
||||
pluginScope.launch {
|
||||
@Suppress("UsagesOfObsoleteApi")
|
||||
startupManager.runOldActivity(extension as StartupActivity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user