This is useful if thumbnails are being rendered when the document is rotated, since it let us abort the current rendering.
This includes an optimization to zero the height and width of existing thumbnail canvases, when they are removed and recreated during rotation of the document. (Credit goes to nnethercote, who initially found this in PR 4920.)