Fix for a problem where the dummyLayoutRequest was being removed during incremental layout and thus causing some terrible crashes. See the bug for the gory details. b=90733 sr=waterson r=nisheeth

git-svn-id: svn://10.0.0.236/trunk@99621 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
attinasi%netscape.com
2001-07-20 00:44:15 +00:00
parent 9574f097a0
commit 3d92ed6a67
2 changed files with 6 additions and 2 deletions

View File

@@ -1073,6 +1073,8 @@ protected:
// This method should be called after a reflow commands have been
// removed from the queue, but after the state in the presshell is
// such that it's safe to flush (i.e. mIsReflowing == PR_FALSE)
// If we are not reflowing and ther are no load-crated reflow commands, then
// the dummyLayoutRequest is removed
void DoneRemovingReflowCommands();
nsresult AddDummyLayoutRequest(void);
@@ -6121,7 +6123,7 @@ PresShell::ReflowCommandRemoved(nsIReflowCommand* aRC)
void
PresShell::DoneRemovingReflowCommands()
{
if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest) {
if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest && !mIsReflowing) {
RemoveDummyLayoutRequest();
}
}

View File

@@ -1073,6 +1073,8 @@ protected:
// This method should be called after a reflow commands have been
// removed from the queue, but after the state in the presshell is
// such that it's safe to flush (i.e. mIsReflowing == PR_FALSE)
// If we are not reflowing and ther are no load-crated reflow commands, then
// the dummyLayoutRequest is removed
void DoneRemovingReflowCommands();
nsresult AddDummyLayoutRequest(void);
@@ -6121,7 +6123,7 @@ PresShell::ReflowCommandRemoved(nsIReflowCommand* aRC)
void
PresShell::DoneRemovingReflowCommands()
{
if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest) {
if (mRCCreatedDuringLoad == 0 && mDummyLayoutRequest && !mIsReflowing) {
RemoveDummyLayoutRequest();
}
}