Bug 1023618 - Ensure that win.document.documentElement exists before using it. r=roc

This commit is contained in:
Seth Fowler 2014-06-16 20:57:35 -07:00
parent 27b5e982a8
commit 5f8a63a8d4

View File

@ -329,12 +329,14 @@ function FlushRendering() {
.getInterface(CI.nsIDOMWindowUtils);
var afterPaintWasPending = utils.isMozAfterPaintPending;
if (win.document.documentElement) {
try {
// Flush pending restyles and reflows for this window
win.document.documentElement.getBoundingClientRect();
} catch (e) {
LogWarning("flushWindow failed: " + e + "\n");
}
}
if (!afterPaintWasPending && utils.isMozAfterPaintPending) {
LogInfo("FlushRendering generated paint for window " + win.location.href);