diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index b0ad140be47..0a7b826d4cd 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -6138,7 +6138,7 @@ PresShell::AddDummyLayoutRequest(void) { nsresult rv = NS_OK; - if (gAsyncReflowDuringDocLoad) { + if (gAsyncReflowDuringDocLoad && !mIsReflowing) { rv = DummyLayoutRequest::Create(getter_AddRefs(mDummyLayoutRequest), this); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index b0ad140be47..0a7b826d4cd 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -6138,7 +6138,7 @@ PresShell::AddDummyLayoutRequest(void) { nsresult rv = NS_OK; - if (gAsyncReflowDuringDocLoad) { + if (gAsyncReflowDuringDocLoad && !mIsReflowing) { rv = DummyLayoutRequest::Create(getter_AddRefs(mDummyLayoutRequest), this); if (NS_FAILED(rv)) return rv;