Skip to content

Commit e9a0158

Browse files
astreetfacebook-github-bot
authored andcommitted
Remove dead code tracking debug components
Reviewed By: pentiumao Differential Revision: D73112441 fbshipit-source-id: 3734066a2ad4b978b2b8b2c279a432ec4c72804a
1 parent c66795c commit e9a0158

3 files changed

Lines changed: 9 additions & 23 deletions

File tree

litho-core/src/main/java/com/facebook/litho/DebugComponent.kt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,15 @@ private constructor(
359359
}
360360
val componentKey = node.getGlobalKeyAt(componentIndex)
361361
return DebugComponent(
362-
globalKey = generateGlobalKey(context, componentKey),
363-
result = result,
364-
node = result.node,
365-
componentIndex = componentIndex,
366-
x = x,
367-
y = y,
368-
xOffset = xOffset,
369-
yOffset = yOffset,
370-
)
371-
.also { node.registerDebugComponent(it) }
362+
globalKey = generateGlobalKey(context, componentKey),
363+
result = result,
364+
node = result.node,
365+
componentIndex = componentIndex,
366+
x = x,
367+
y = y,
368+
xOffset = xOffset,
369+
yOffset = yOffset,
370+
)
372371
}
373372

374373
@JvmStatic

litho-core/src/main/java/com/facebook/litho/LithoNode.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ open class LithoNode : Node<LithoLayoutContext>, Cloneable {
7070
// region private properties
7171
private var _transitionId: TransitionId? = null
7272
private var _attachables: MutableList<Attachable>? = null
73-
private var debugComponents: MutableSet<DebugComponent>? = null
7473
private var _unresolvedComponents: MutableList<Component>? = null
7574
private var frozen: Boolean = false
7675
private var nodeInfoWasWritten: Boolean = false
@@ -754,13 +753,6 @@ open class LithoNode : Node<LithoLayoutContext>, Cloneable {
754753
this.justifyContent = justifyContent
755754
}
756755

757-
fun registerDebugComponent(debugComponent: DebugComponent) {
758-
if (debugComponents == null) {
759-
debugComponents = HashSet()
760-
}
761-
debugComponents?.add(debugComponent)
762-
}
763-
764756
fun setMeasureFunction(measureFunction: YogaMeasureFunction) {
765757
yogaMeasureFunction = measureFunction
766758
}
@@ -884,10 +876,6 @@ open class LithoNode : Node<LithoLayoutContext>, Cloneable {
884876
nestedTreeHolder = holder
885877
}
886878

887-
fun resetDebugInfo() {
888-
debugComponents = null
889-
}
890-
891879
private fun shouldApplyTouchExpansion(): Boolean =
892880
touchExpansion != null && (nodeInfo?.hasTouchEventHandlers() == true)
893881

litho-core/src/main/java/com/facebook/litho/Resolver.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ object Resolver {
576576
// 2. Shallow copy this layout.
577577
val layout: LithoNode = current.clone()
578578
layout.children = ArrayList(current.childCount)
579-
layout.resetDebugInfo()
580579
commitToLayoutState(resolveContext.treeState, current)
581580

582581
// 3. Iterate over children.

0 commit comments

Comments
 (0)