Bug 268513 overflow:scroll causes memory growth
r/sr=bz, a=asa
This commit is contained in:
@@ -1401,6 +1401,7 @@ protected:
|
|||||||
PRPackedBool mDocumentLoading;
|
PRPackedBool mDocumentLoading;
|
||||||
PRPackedBool mIsReflowing;
|
PRPackedBool mIsReflowing;
|
||||||
PRPackedBool mIsDestroying;
|
PRPackedBool mIsDestroying;
|
||||||
|
PRPackedBool mIsReleasingAnonymousContent;
|
||||||
|
|
||||||
PRPackedBool mDidInitialReflow;
|
PRPackedBool mDidInitialReflow;
|
||||||
PRPackedBool mIgnoreFrameDestruction;
|
PRPackedBool mIgnoreFrameDestruction;
|
||||||
@@ -1654,6 +1655,7 @@ PresShell::PresShell()
|
|||||||
#endif
|
#endif
|
||||||
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
|
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
|
||||||
mIsThemeSupportDisabled = PR_FALSE;
|
mIsThemeSupportDisabled = PR_FALSE;
|
||||||
|
mIsReleasingAnonymousContent = PR_FALSE;
|
||||||
|
|
||||||
new (this) nsFrameManager();
|
new (this) nsFrameManager();
|
||||||
}
|
}
|
||||||
@@ -4906,6 +4908,9 @@ PresShell::SetAnonymousContentFor(nsIContent* aContent, nsISupportsArray* aAnony
|
|||||||
|
|
||||||
content->UnbindFromTree();
|
content->UnbindFromTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mIsReleasingAnonymousContent)
|
||||||
|
mAnonymousContentTable->Remove(&key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4954,6 +4959,7 @@ NS_IMETHODIMP
|
|||||||
PresShell::ReleaseAnonymousContent()
|
PresShell::ReleaseAnonymousContent()
|
||||||
{
|
{
|
||||||
if (mAnonymousContentTable) {
|
if (mAnonymousContentTable) {
|
||||||
|
mIsReleasingAnonymousContent = PR_TRUE;
|
||||||
mAnonymousContentTable->Enumerate(ClearDocumentEnumerator);
|
mAnonymousContentTable->Enumerate(ClearDocumentEnumerator);
|
||||||
delete mAnonymousContentTable;
|
delete mAnonymousContentTable;
|
||||||
mAnonymousContentTable = nsnull;
|
mAnonymousContentTable = nsnull;
|
||||||
|
|||||||
Reference in New Issue
Block a user