[enableInfiniteRenderLoopDetection] Add a flag to force throwing#36357
[enableInfiniteRenderLoopDetection] Add a flag to force throwing#36357
Conversation
|
Comparing: 561ed52...e0d7acf Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
| if ( | ||
| isFromInfiniteRenderLoopDetectionInstrumentation || | ||
| (executionContext & RenderContext && workInProgressRoot !== null) | ||
| (executionContext & RenderContext) !== NoContext |
There was a problem hiding this comment.
Why are we dropping the check on workInProgressRoot?
There was a problem hiding this comment.
This should not have any difference and can be treated as forward-fix. executionContext & RenderContext check implies the workInProgressRoot presence.
This was initially introduced in #26625 and it was used for gating the update of the errorRecoveryDisabledLanes for this root, and it is required to satisfy Flow checks.
The current setup follows the same logic: if the current execution context is render context, and the working root is present, we will disable the recovery lanes, and then we will throw the error no matter what. In our case throwing is gated behind enableInfiniteRenderLoopDetectionForceThrow, which is introduced in this PR.
…ebook#36357) Adds a `enableInfiniteRenderLoopDetectionForceThrow` flag, which changes the detection mechanism behaviour to start throwing, when the loop is observed. By default, the value is set to `false`, also made dynamic from the start for `www`. DiffTrain build for [f4e0d4e](facebook@f4e0d4e)
…ebook#36357) Adds a `enableInfiniteRenderLoopDetectionForceThrow` flag, which changes the detection mechanism behaviour to start throwing, when the loop is observed. By default, the value is set to `false`, also made dynamic from the start for `www`. DiffTrain build for [f4e0d4e](facebook@f4e0d4e)
Adds a
enableInfiniteRenderLoopDetectionForceThrowflag, which changes the detection mechanism behaviour to start throwing, when the loop is observed. By default, the value is set tofalse, also made dynamic from the start forwww.