mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Stacked on #33482. There's a flaw with getting information from the execution context of the ping. For the soft-deprecated "throw a promise" technique, this is a bit unreliable because you could in theory throw the same one multiple times. Similarly, a more fundamental flaw with that API is that it doesn't allow for tracking the information of Promises that are already synchronously able to resolve. This stops tracking the async debug info in the case of throwing a Promise and only when you render a Promise. That means some loss of data but we should just warn for throwing a Promise anyway. Instead, this also adds support for tracking `use()`d thenables and forwarding `_debugInfo` from then. This is done by extracting the info from the Promise after the fact instead of in the resolve so that it only happens once at the end after the pings are done. This also supports passing the same Promise in multiple places and tracking the debug info at each location, even if it was already instrumented with a synchronous value by the time of the second use. |
||
|---|---|---|
| .. | ||
| babel | ||
| bench | ||
| ci | ||
| devtools | ||
| error-codes | ||
| eslint | ||
| eslint-rules | ||
| flags | ||
| flow | ||
| git | ||
| jest | ||
| perf-counters | ||
| prettier | ||
| print-warnings | ||
| react-compiler | ||
| release | ||
| rollup | ||
| shared | ||
| tasks | ||