Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IndexOutOfRangeException when an added/removed attribute spans a …
…buffer size boundary (#50110) **NOTE: I'm not actually proposing this for servicing right now, because it doesn't look like there would be a major benefit from including it in RC1, and including it in RC2 would be perfectly sufficient. However I'm writing up the ask mode template anyway just in case people disagree.** Extremely rarely, component rendering could cause IndexOutOfRangeException. ## Description If a component rendered a very specific number of frames, and then updated to render exactly one more frame, and that new frame was an attribute, and it was the last frame in the component, the diffing system would throw `IndexOutOfRangeException`. This was due to a bug in checking whether there are more attributes to process. Fixes #49192 ## Customer Impact Fairly low, because it's really hard to reproduce this, even if you're doing so on purpose. However, total correctness of the Blazor renderer is a high priority for us, and we do not want any edge cases where it can fail. In the event that the issue does occur, it would behave like an unhandled exception from application code: * For Blazor WebAssembly, the yellow error bar would appear, but the app would continue running * For Blazor Server, the current user's circuit would be terminated, but other server activity would be unaffected * For Blazor WebView, the unhandled exception callback would run ## Regression? - [ ] Yes - [x] No [If yes, specify the version the behavior has regressed from] ## Risk - [ ] High - [ ] Medium - [x] Low Low because the code change is small enough (4 lines) to reason clearly that it only makes a difference in the case where it would have failed before. The updated boundary condition is simple to understand. ## Verification - [x] Manual (required) - [x] Automated ## Packaging changes reviewed? - [ ] Yes - [ ] No - [x] N/A
- Loading branch information