Skip to content

Commit 4101fd7

Browse files
committed
Remove markRenderAbandoned
1 parent d3d0459 commit 4101fd7

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.old.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ import {
6767
markRenderStarted,
6868
markRenderYielded,
6969
markRenderStopped,
70-
markRenderAbandoned,
7170
} from './SchedulingProfiling';
7271

7372
// The scheduler is imported here *only* to detect whether it's been mocked
@@ -475,18 +474,6 @@ export function scheduleUpdateOnFiber(
475474
return null;
476475
}
477476

478-
if (enableSchedulingProfiling) {
479-
if (
480-
workInProgressRoot !== null &&
481-
// TODO: Confirm that this makes sense
482-
!includesSomeLane(workInProgressRootRenderLanes, lane)
483-
// Original criterion: expirationTime > renderExpirationTime
484-
// Location: https://github.com/bvaughn/react/blob/root-event-marks/packages/react-reconciler/src/ReactFiberWorkLoop.js#L2846
485-
) {
486-
markRenderAbandoned();
487-
}
488-
}
489-
490477
// TODO: requestUpdateLanePriority also reads the priority. Pass the
491478
// priority as an argument to that function and this one.
492479
const priorityLevel = getCurrentPriorityLevel();

packages/react-reconciler/src/SchedulingProfiling.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ export function markRenderStarted(lanes: Lanes): void {
118118
}
119119
}
120120

121-
export function markRenderAbandoned(): void {
122-
if (enableSchedulingProfiling) {
123-
if (supportsUserTiming) {
124-
performance.mark('--render-cancel');
125-
}
126-
}
127-
}
128-
129121
export function markRenderYielded(): void {
130122
if (enableSchedulingProfiling) {
131123
if (supportsUserTiming) {

packages/react-reconciler/src/__tests__/SchedulingProfiling-test.internal.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,8 @@ describe('SchedulingProfiling', () => {
351351
expect(Scheduler).toFlushUntilNextPaint([]);
352352
}).toErrorDev('Cannot update during an existing state transition');
353353

354-
expect(marks.map(normalizeCodeLocInfo)).toEqual(
355-
expect.arrayContaining([
356-
'--render-cancel',
357-
'--schedule-state-update-Example-1024-\n in Example (at **)',
358-
]),
354+
expect(marks.map(normalizeCodeLocInfo)).toContain(
355+
'--schedule-state-update-Example-1024-\n in Example (at **)',
359356
);
360357
});
361358

@@ -381,11 +378,8 @@ describe('SchedulingProfiling', () => {
381378
expect(Scheduler).toFlushUntilNextPaint([]);
382379
}).toErrorDev('Cannot update during an existing state transition');
383380

384-
expect(marks.map(normalizeCodeLocInfo)).toEqual(
385-
expect.arrayContaining([
386-
'--render-cancel',
387-
'--schedule-forced-update-Example-1024-\n in Example (at **)',
388-
]),
381+
expect(marks.map(normalizeCodeLocInfo)).toContain(
382+
'--schedule-forced-update-Example-1024-\n in Example (at **)',
389383
);
390384
});
391385

0 commit comments

Comments
 (0)