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

This commit is contained in:
attinasi%netscape.com 2001-07-20 00:44:15 +00:00
Родитель 676f8c7712
Коммит bc33aac05b
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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();
}
}

Просмотреть файл

@ -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();
}
}