Fixing bug 98828. Cache a few nsSpaceManager objects to avoid spending 43%cvs ci -m ! of the time spent in PresShell::ProcessReflowCommand() in new and delete. r=dbaron@fas.harvard.edu, sr=waterson@netscape.com
This commit is contained in:
@@ -674,7 +674,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
// only when there are actually floats to manage. Otherwise things
|
||||
// like tables will gain significant bloat.
|
||||
if (NS_BLOCK_SPACE_MGR & mState) {
|
||||
nsSpaceManager* rawPtr = new nsSpaceManager(this);
|
||||
nsSpaceManager* rawPtr = nsSpaceManager::Create(this);
|
||||
if (!rawPtr) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user