Notably: as of this patch, flex containers will no longer care about interrupts that happen during their "final/official reflow" of their flex items.
This is fine, because any interruptions during that phase will be appropriately queued up for further reflows, via the interrupted frame's call to
mPresShell->FrameNeedsToContinueReflow() inside of
nsPresContext::CheckForInterrupt. That will ensure that the next reflow will be aware that this frame needs another reflow. (This doesn't caused cached measurements to be purged, though, which is why we have to check for interrupts during measurement & purge those specially.)
In looking at the
FrameNeedsToContinueReflow pipeline, though, I actually think we can address the TODO(emilio) comment and correctly invalidate cached measurements on just the frames that had some descendant reflow interrupted... I think we can & should add some cache-purging to https://searchfox.org/mozilla-central/rev/131338e5017bc0283d86fb73844407b9a2155c98/layout/base/PresShell.cpp#9230-9240 , and then we can do away with the interrupt-related cache-purging code in nsFlexContainerFrame.
That almost makes me want to just morph this bug, but I think I'm going to keep it as-is and spin off the further-improvement as another followup bug. I think this patch here is still an incremental improvement, even if it's going to be removed in the next followup, and I wouldn't be surprised if the next step causes an unforseen behavior-change/issue (in which case it'll be nice to have this bug's fix in as a rollback point)