Skip to content

Commit de5d1aa

Browse files
and-oliDevtools-frontend LUCI CQ
authored andcommitted
Remove manual support of JS scheduling events
We kept them for a couple of milestones for backwards compat. These are now computed automatically based on flow events that we dispatch as of recently [1]. [1] https://chromium-review.googlesource.com/c/v8/v8/+/6021036 Fixed: 383974422 Change-Id: I77a65080838d043c7cfa64ad47f4a924d455fdb9 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6237086 Auto-Submit: Andres Olivares <[email protected]> Reviewed-by: Jack Franklin <[email protected]> Commit-Queue: Jack Franklin <[email protected]>
1 parent 6c22159 commit de5d1aa

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

front_end/models/trace/handlers/InitiatorsHandler.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,15 @@ const eventToInitiatorMap = new Map<Types.Events.Event, Types.Events.Event>();
3030
// multiple events, hence why the value for this map is an array.
3131
const initiatorToEventsMap = new Map<Types.Events.Event, Types.Events.Event[]>();
3232

33-
// Note: we are keeping the parsing of the following async JS schedulers
34-
// for backwards compatibility only. They are targeted to be removed
35-
// completely by M134. See more details at crbug.com/383974422
36-
// TODO(andoli): remove manual parsing of async JS schedulers.
37-
const requestAnimationFrameEventsById: Map<number, Types.Events.RequestAnimationFrame> = new Map();
38-
const timerInstallEventsById: Map<number, Types.Events.TimerInstall> = new Map();
39-
const requestIdleCallbackEventsById: Map<number, Types.Events.RequestIdleCallback> = new Map();
40-
4133
const webSocketCreateEventsById: Map<number, Types.Events.WebSocketCreate> = new Map();
4234
const schedulePostTaskCallbackEventsById: Map<number, Types.Events.SchedulePostTaskCallback> = new Map();
4335

4436
export function reset(): void {
4537
lastScheduleStyleRecalcByFrame.clear();
4638
lastInvalidationEventForFrame.clear();
4739
lastUpdateLayoutTreeByFrame.clear();
48-
timerInstallEventsById.clear();
4940
eventToInitiatorMap.clear();
5041
initiatorToEventsMap.clear();
51-
requestAnimationFrameEventsById.clear();
52-
requestIdleCallbackEventsById.clear();
5342
webSocketCreateEventsById.clear();
5443
schedulePostTaskCallbackEventsById.clear();
5544
}
@@ -128,36 +117,6 @@ export function handleEvent(event: Types.Events.Event): void {
128117
}
129118
// Now clear the last invalidation for the frame: the last invalidation has been linked to a Layout event, so it cannot be the initiator for any future layouts.
130119
lastInvalidationEventForFrame.delete(event.args.beginData.frame);
131-
} else if (Types.Events.isRequestAnimationFrame(event)) {
132-
requestAnimationFrameEventsById.set(event.args.data.id, event);
133-
} else if (Types.Events.isFireAnimationFrame(event)) {
134-
// If we get a fire event, that means we should have had the
135-
// RequestAnimationFrame event by now. If so, we can set that as the
136-
// initiator for the fire event.
137-
const matchingRequestEvent = requestAnimationFrameEventsById.get(event.args.data.id);
138-
if (matchingRequestEvent) {
139-
storeInitiator({
140-
event,
141-
initiator: matchingRequestEvent,
142-
});
143-
}
144-
} else if (Types.Events.isTimerInstall(event)) {
145-
timerInstallEventsById.set(event.args.data.timerId, event);
146-
} else if (Types.Events.isTimerFire(event)) {
147-
const matchingInstall = timerInstallEventsById.get(event.args.data.timerId);
148-
if (matchingInstall) {
149-
storeInitiator({event, initiator: matchingInstall});
150-
}
151-
} else if (Types.Events.isRequestIdleCallback(event)) {
152-
requestIdleCallbackEventsById.set(event.args.data.id, event);
153-
} else if (Types.Events.isFireIdleCallback(event)) {
154-
const matchingRequestEvent = requestIdleCallbackEventsById.get(event.args.data.id);
155-
if (matchingRequestEvent) {
156-
storeInitiator({
157-
event,
158-
initiator: matchingRequestEvent,
159-
});
160-
}
161120
} else if (Types.Events.isWebSocketCreate(event)) {
162121
webSocketCreateEventsById.set(event.args.data.identifier, event);
163122
} else if (Types.Events.isWebSocketInfo(event) || Types.Events.isWebSocketTransfer(event)) {

0 commit comments

Comments
 (0)