@@ -615,7 +615,13 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
615615 // means that we don't need an additional field on the work in
616616 // progress.
617617 const current = workInProgress . alternate ;
618+ if ( __DEV__ ) {
619+ ReactDebugCurrentFiber . setCurrentFiber ( workInProgress ) ;
620+ }
618621 const next = completeWork ( current , workInProgress , nextPriorityLevel ) ;
622+ if ( __DEV__ ) {
623+ ReactDebugCurrentFiber . resetCurrentFiber ( ) ;
624+ }
619625
620626 const returnFiber = workInProgress . return ;
621627 const siblingFiber = workInProgress . sibling ;
@@ -706,8 +712,12 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
706712 // See if beginning this work spawns more work.
707713 if ( __DEV__ ) {
708714 startWorkTimer ( workInProgress ) ;
715+ ReactDebugCurrentFiber . setCurrentFiber ( workInProgress ) ;
709716 }
710717 let next = beginWork ( current , workInProgress , nextPriorityLevel ) ;
718+ if ( __DEV__ ) {
719+ ReactDebugCurrentFiber . resetCurrentFiber ( ) ;
720+ }
711721 if ( __DEV__ && ReactFiberInstrumentation . debugTool ) {
712722 ReactFiberInstrumentation . debugTool . onBeginWork ( workInProgress ) ;
713723 }
@@ -718,9 +728,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
718728 }
719729
720730 ReactCurrentOwner . current = null ;
721- if ( __DEV__ ) {
722- ReactDebugCurrentFiber . resetCurrentFiber ( ) ;
723- }
724731
725732 return next ;
726733 }
@@ -735,6 +742,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
735742 // See if beginning this work spawns more work.
736743 if ( __DEV__ ) {
737744 startWorkTimer ( workInProgress ) ;
745+ ReactDebugCurrentFiber . setCurrentFiber ( workInProgress ) ;
738746 }
739747 let next = beginFailedWork ( current , workInProgress , nextPriorityLevel ) ;
740748 if ( __DEV__ && ReactFiberInstrumentation . debugTool ) {
0 commit comments