Implementing a generalized recycler and arena for all layout frames. Hoping to improve
bug #9489. Should also definitely fix bug #15916. r=troy git-svn-id: svn://10.0.0.236/trunk@55321 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -376,8 +376,10 @@ nsObjectFrame::Init(nsIPresContext* aPresContext,
|
||||
|
||||
if(bImage)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
nsIFrame * aNewFrame = nsnull;
|
||||
rv = NS_NewImageFrame(&aNewFrame);
|
||||
rv = NS_NewImageFrame(shell, &aNewFrame);
|
||||
if(rv != NS_OK)
|
||||
return rv;
|
||||
|
||||
@@ -1341,13 +1343,13 @@ nsresult nsObjectFrame::GetPluginInstance(nsIPluginInstance*& aPluginInstance)
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_NewObjectFrame(nsIFrame** aNewFrame)
|
||||
NS_NewObjectFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
|
||||
{
|
||||
NS_PRECONDITION(aNewFrame, "null OUT ptr");
|
||||
if (nsnull == aNewFrame) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
nsObjectFrame* it = new nsObjectFrame;
|
||||
nsObjectFrame* it = new (aPresShell) nsObjectFrame;
|
||||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user