Skip to content

Commit

Permalink
old
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaruan committed Aug 25, 2022
1 parent 0a5bbe0 commit b105975
Show file tree
Hide file tree
Showing 6 changed files with 343 additions and 47 deletions.
2 changes: 2 additions & 0 deletions packages/react-reconciler/src/ReactFiber.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,8 @@ export function createFiberFromTracingMarker(
tag: TransitionTracingMarker,
transitions: null,
pendingBoundaries: null,
aborts: null,
name: pendingProps.name,
};
fiber.stateNode = tracingMarkerInstance;
return fiber;
Expand Down
10 changes: 9 additions & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ import {
StaticMask,
ShouldCapture,
ForceClientRender,
Passive,
} from './ReactFiberFlags';
import ReactSharedInternals from 'shared/ReactSharedInternals';
import {
Expand Down Expand Up @@ -979,10 +980,17 @@ function updateTracingMarkerComponent(
const markerInstance: TracingMarkerInstance = {
tag: TransitionTracingMarker,
transitions: new Set(currentTransitions),
pendingBoundaries: new Map(),
pendingBoundaries: null,
name: workInProgress.pendingProps.name,
aborts: null,
};
workInProgress.stateNode = markerInstance;

// We call the marker complete callback when all child suspense boundaries resolve.
// We do this in the commit phase on Offscreen. If the marker has no child suspense
// boundaries, we need to schedule a passive effect to make sure we call the marker
// complete callback.
workInProgress.flags |= Passive;
}
} else {
if (__DEV__) {
Expand Down
Loading

0 comments on commit b105975

Please sign in to comment.