mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 315127. Go back to allocating NS_NewDirectionalFrame on the heap, to fix crash regression. r+sr=dbaron
This commit is contained in:
parent
dd69f4c1b0
commit
599bd30eab
@ -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 */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user