fix: explicitly warn for infinite loops discovered only via enableInfiniteRenderLoopDetection (#36195)
My change in https://github.com/facebook/react/pull/35999 did not cover all possible scenarios for emitting a warning, instead of throwing. The instrumentation not only enables the identification for the infinite loop via execution context checks, but also adds the check to more lifecycle methods, like `markRootPinged` and `markRootUpdated`. See the newly added test to understand a potential scenario. Before the fix, the error would be thrown: <img width="1192" height="424" alt="Screenshot 2026-04-08 at 17 21 51" src="https://github.com/user-attachments/assets/ba8ea379-0271-4938-ae45-e37ee75e1963" /> With the current changes, the warning is logged with `console.error`. DiffTrain build for [fef12a01c826ce5b8458e82240c659bf51108a46](https://github.com/facebook/react/commit/fef12a01c826ce5b8458e82240c659bf51108a46)
H
hoxyq committed
3876c2fbbe5e960c8b738d62664cae4f6870ea2b
Parent: 2ce4709