Commit 9813abc
committed
fix: reset StartupLogger on JS reload so runJsBundleStart marker is recorded (#56339)
PR #54255 (which made StartupLogger reset on APP_STARTUP_START) introduced a regression in 0.83 where the `runJsBundleStart` performance marker is dropped on JS reload. On reload, RUN_JS_BUNDLE_START and INIT_REACT_RUNTIME_START fire and are rejected by the still-populated StartupLogger as duplicates; only afterward does APP_STARTUP_START fire and reset the logger, leaving NaN start times paired with valid end times. As a result `performance.measure('runJsBundle', 'runJsBundleStart', 'runJsBundleEnd')` throws "The mark 'runJsBundleStart' does not exist." after the first load.
Pre-emptively call StartupLogger::reset() at the top of ReactInstance::loadScript so every load (including reloads) starts with a clean logger and the startup markers are recorded correctly each time.1 parent ccff70b commit 9813abc
1 file changed
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| |||
0 commit comments