Repository navigation
Commit df5bd81
committed
fix(octane): defer transition followup dispatch in wrapResume until flush
adoptTransitionQueue dispatches TRANSITION_FOLLOWUPS as microtasks under
the contract that the caller flushes synchronously in the same turn.
wrapResume breaks that contract on two paths:
1. When waiting on in-flight view transition handles (promise-deferred),
followups run as microtasks before the promise resolves.
2. When vtNativeAvailable returns false, followups run before the
scheduled flush microtask.
Save and clear TRANSITION_FOLLOWUPS before adoptTransitionQueue, then
dispatch them at each exit path's correct flush point:
- Urgent/cascade path: queued before synchronous work()+flushWork().
- Promise-deferred path: re-injected into TRANSITION_FOLLOWUPS for the
recursive wrapResume's adopt to dispatch at the right time.
- !vtNativeAvailable path: queued after vtScheduleQueuedWork() so they
run after the scheduled flush.
- vtFlush path: queued before the synchronous vtFlush call.1 parent 2d993e4 commit df5bd81
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7051 | 7051 | | |
7052 | 7052 | | |
7053 | 7053 | | |
| 7054 | + | |
| 7055 | + | |
| 7056 | + | |
| 7057 | + | |
| 7058 | + | |
| 7059 | + | |
| 7060 | + | |
7054 | 7061 | | |
7055 | 7062 | | |
7056 | 7063 | | |
| |||
7061 | 7068 | | |
7062 | 7069 | | |
7063 | 7070 | | |
| 7071 | + | |
| 7072 | + | |
7064 | 7073 | | |
7065 | 7074 | | |
7066 | 7075 | | |
7067 | 7076 | | |
7068 | 7077 | | |
7069 | 7078 | | |
7070 | 7079 | | |
| 7080 | + | |
7071 | 7081 | | |
| 7082 | + | |
| 7083 | + | |
| 7084 | + | |
7072 | 7085 | | |
7073 | 7086 | | |
7074 | 7087 | | |
| |||
7079 | 7092 | | |
7080 | 7093 | | |
7081 | 7094 | | |
| 7095 | + | |
7082 | 7096 | | |
| 7097 | + | |
| 7098 | + | |
7083 | 7099 | | |
7084 | 7100 | | |
| 7101 | + | |
| 7102 | + | |
7085 | 7103 | | |
7086 | 7104 | | |
7087 | 7105 | | |
| |||
0 commit comments