(finishedRoot, finishedWork)
| 23247 | } |
| 23248 | |
| 23249 | function commitPassiveEffectDurations(finishedRoot, finishedWork) { |
| 23250 | { |
| 23251 | // Only Profilers with work in their subtree will have an Update effect scheduled. |
| 23252 | if ((finishedWork.flags & Update) !== NoFlags) { |
| 23253 | switch (finishedWork.tag) { |
| 23254 | case Profiler: |
| 23255 | { |
| 23256 | var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration; |
| 23257 | var _finishedWork$memoize = finishedWork.memoizedProps, |
| 23258 | id = _finishedWork$memoize.id, |
| 23259 | onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase. |
| 23260 | // It does not get reset until the start of the next commit phase. |
| 23261 | |
| 23262 | var commitTime = getCommitTime(); |
| 23263 | var phase = finishedWork.alternate === null ? 'mount' : 'update'; |
| 23264 | |
| 23265 | { |
| 23266 | if (isCurrentUpdateNested()) { |
| 23267 | phase = 'nested-update'; |
| 23268 | } |
| 23269 | } |
| 23270 | |
| 23271 | if (typeof onPostCommit === 'function') { |
| 23272 | onPostCommit(id, phase, passiveEffectDuration, commitTime); |
| 23273 | } // Bubble times to the next nearest ancestor Profiler. |
| 23274 | // After we process that Profiler, we'll bubble further up. |
| 23275 | |
| 23276 | |
| 23277 | var parentFiber = finishedWork.return; |
| 23278 | |
| 23279 | outer: while (parentFiber !== null) { |
| 23280 | switch (parentFiber.tag) { |
| 23281 | case HostRoot: |
| 23282 | var root = parentFiber.stateNode; |
| 23283 | root.passiveEffectDuration += passiveEffectDuration; |
| 23284 | break outer; |
| 23285 | |
| 23286 | case Profiler: |
| 23287 | var parentStateNode = parentFiber.stateNode; |
| 23288 | parentStateNode.passiveEffectDuration += passiveEffectDuration; |
| 23289 | break outer; |
| 23290 | } |
| 23291 | |
| 23292 | parentFiber = parentFiber.return; |
| 23293 | } |
| 23294 | |
| 23295 | break; |
| 23296 | } |
| 23297 | } |
| 23298 | } |
| 23299 | } |
| 23300 | } |
| 23301 | |
| 23302 | function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) { |
| 23303 | if ((finishedWork.flags & LayoutMask) !== NoFlags) { |
no test coverage detected
searching dependent graphs…