misc [wsm]: Fix OOBE in recursive update checker

(cherry picked from commit d707dfe664154f7d1363a215ab889bf7d4a8a236)

IJ-CR-216025

GitOrigin-RevId: 8e5ab993ff9bcfafd29dc4415dd85709f25e736d
This commit is contained in:
Konstantin Nisht
2026-07-30 10:49:27 +00:00
committed by intellij-monorepo-bot
parent 08fe83d7f5
commit 071663c940
@@ -364,6 +364,10 @@ open class WorkspaceModelImpl : WorkspaceModelInternal {
* Things that must be considered if you'd love to change this logic: IDEA-342103
*/
private fun checkRecursiveUpdate() = checkRecursiveUpdateTimeMs.addMeasuredTime {
val stackTrace = RuntimeException().stackTrace
if (stackTrace.size < 6) {
return@addMeasuredTime
}
val stackStraceIterator = RuntimeException().stackTrace.iterator()
// Skip six methods of the current update
repeat(6) { stackStraceIterator.next() }