зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1023618 - Ensure that win.document.documentElement exists before using it. r=roc
This commit is contained in:
Родитель
04e0b841e9
Коммит
ba4e3dddeb
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче