Prevent diff viewer breakages when comment containers are missing.

Review Request #9909 — Created May 3, 2018 and submitted

chipx86
Review Board
release-3.0.x
37a93be...
reviewboard

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.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (630cc63)
Loading...