Bug 315127. Go back to allocating NS_NewDirectionalFrame on the heap, to fix crash regression. r+sr=dbaron

This commit is contained in:
roc+%cs.cmu.edu 2005-11-06 22:47:10 +00:00
parent dd69f4c1b0
commit 599bd30eab
2 changed files with 13 additions and 1 deletions

View File

@ -90,10 +90,20 @@ nsDirectionalFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
return rv;
}
void*
nsDirectionalFrame::operator new(size_t aSize) CPP_THROW_NEW
{
void* frame = ::operator new(aSize);
if (frame) {
memset(frame, 0, aSize);
}
return frame;
}
nsIFrame*
NS_NewDirectionalFrame(nsIPresShell* aPresShell, PRUnichar aChar)
{
return new (aPresShell) nsDirectionalFrame(aChar);
return new nsDirectionalFrame(aChar);
}
#endif /* IBMBIDI */

View File

@ -57,6 +57,8 @@ protected:
public:
nsDirectionalFrame(PRUnichar aChar);
void* operator new(size_t aSize) CPP_THROW_NEW;
static const nsIID& GetIID();
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);