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
Родитель 04e0b841e9
Коммит ba4e3dddeb
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -329,11 +329,13 @@ function FlushRendering() {
.getInterface(CI.nsIDOMWindowUtils);
var afterPaintWasPending = utils.isMozAfterPaintPending;
try {
// Flush pending restyles and reflows for this window
win.document.documentElement.getBoundingClientRect();
} catch (e) {
LogWarning("flushWindow failed: " + e + "\n");
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) {