Prevent diff viewer breakages when comment containers are missing.
Review Request #9909 — Created May 3, 2018 and submitted — Latest diff uploaded
If there's inconsistent state in the database due to hand-modifications
or some form of corruption, it's possible for the diff viewer to attempt
to load comment fragments into containers that don't exist. If this
happens, the diff viewer completely breaks. It really shouldn't happen
outside of development setups, but when it does, it's bad.This change looks for this and skips the comment, leaving an error in
the console and moving on.
Loaded several diffs: Working ones, and a broken one that prompted this
change. All loaded successfully, and the broken one notified about the
broken containers and comment IDs.Unit tests pass.