mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1023618 - Ensure that win.document.documentElement exists before using it. r=roc
This commit is contained in:
parent
27b5e982a8
commit
5f8a63a8d4
@ -329,11 +329,13 @@ function FlushRendering() {
|
|||||||
.getInterface(CI.nsIDOMWindowUtils);
|
.getInterface(CI.nsIDOMWindowUtils);
|
||||||
var afterPaintWasPending = utils.isMozAfterPaintPending;
|
var afterPaintWasPending = utils.isMozAfterPaintPending;
|
||||||
|
|
||||||
try {
|
if (win.document.documentElement) {
|
||||||
// Flush pending restyles and reflows for this window
|
try {
|
||||||
win.document.documentElement.getBoundingClientRect();
|
// Flush pending restyles and reflows for this window
|
||||||
} catch (e) {
|
win.document.documentElement.getBoundingClientRect();
|
||||||
LogWarning("flushWindow failed: " + e + "\n");
|
} catch (e) {
|
||||||
|
LogWarning("flushWindow failed: " + e + "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!afterPaintWasPending && utils.isMozAfterPaintPending) {
|
if (!afterPaintWasPending && utils.isMozAfterPaintPending) {
|
||||||
|
Loading…
Reference in New Issue
Block a user