( root: FiberRoot, fiber: Fiber, lanes: Lanes | Lane, )
| 1151 | } |
| 1152 | |
| 1153 | export function addFiberToLanesMap( |
| 1154 | root: FiberRoot, |
| 1155 | fiber: Fiber, |
| 1156 | lanes: Lanes | Lane, |
| 1157 | ) { |
| 1158 | if (!enableUpdaterTracking) { |
| 1159 | return; |
| 1160 | } |
| 1161 | if (!isDevToolsPresent) { |
| 1162 | return; |
| 1163 | } |
| 1164 | const pendingUpdatersLaneMap = root.pendingUpdatersLaneMap; |
| 1165 | while (lanes > 0) { |
| 1166 | const index = laneToIndex(lanes); |
| 1167 | const lane = 1 << index; |
| 1168 | |
| 1169 | const updaters = pendingUpdatersLaneMap[index]; |
| 1170 | updaters.add(fiber); |
| 1171 | |
| 1172 | lanes &= ~lane; |
| 1173 | } |
| 1174 | } |
| 1175 | |
| 1176 | export function movePendingFibersToMemoized(root: FiberRoot, lanes: Lanes) { |
| 1177 | if (!enableUpdaterTracking) { |
no test coverage detected