From 1cda08719ece83bf56ccfec76f71dc812372dc32 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Mon, 21 Aug 2000 20:10:07 +0000 Subject: [PATCH] Bug 47843. Be sure to set nsPresShell's mIsReflowing during initial reflow to avoid re-entrancy. r=nisheeth git-svn-id: svn://10.0.0.236/trunk@76790 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsPresShell.cpp | 4 ++++ mozilla/layout/html/base/src/nsPresShell.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 680c925de01..34bb8a643b3 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -1749,6 +1749,8 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight) nsresult rv=CreateRenderingContext(rootFrame, &rcx); if (NS_FAILED(rv)) return rv; + mIsReflowing = PR_TRUE; + nsHTMLReflowState reflowState(mPresContext, rootFrame, eReflowReason_Initial, rcx, maxSize); nsIView* view; @@ -1782,6 +1784,8 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight) NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::InitialReflow")); MOZ_TIMER_DEBUGLOG(("Stop: Reflow: PresShell::InitialReflow(), this=%p\n", this)); MOZ_TIMER_STOP(mReflowWatch); + + mIsReflowing = PR_FALSE; } DidCauseReflow(); diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 680c925de01..34bb8a643b3 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -1749,6 +1749,8 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight) nsresult rv=CreateRenderingContext(rootFrame, &rcx); if (NS_FAILED(rv)) return rv; + mIsReflowing = PR_TRUE; + nsHTMLReflowState reflowState(mPresContext, rootFrame, eReflowReason_Initial, rcx, maxSize); nsIView* view; @@ -1782,6 +1784,8 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight) NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::InitialReflow")); MOZ_TIMER_DEBUGLOG(("Stop: Reflow: PresShell::InitialReflow(), this=%p\n", this)); MOZ_TIMER_STOP(mReflowWatch); + + mIsReflowing = PR_FALSE; } DidCauseReflow();