Add CPP_THROW_NEW macro to the build system. This macro should be used when defining a local |operator new| function. It will be set to an empty throw function by default on all platforms except mac CW builds. This will allow us to not crash on systems that expect |operator new| to throw an exception by default and will suppress compiler warnings about how |operator new| should throw an exception instead of returning NULL.
Bug 149032 r=timeless sr=scc git-svn-id: svn://10.0.0.236/trunk@124526 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -234,7 +234,7 @@ nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
|
||||
}
|
||||
|
||||
void*
|
||||
nsStyleFont::operator new(size_t sz, nsIPresContext* aContext) {
|
||||
nsStyleFont::operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
if (result)
|
||||
@@ -315,7 +315,7 @@ nsStyleMargin::nsStyleMargin(const nsStyleMargin& aSrc) {
|
||||
}
|
||||
|
||||
void*
|
||||
nsStyleMargin::operator new(size_t sz, nsIPresContext* aContext) {
|
||||
nsStyleMargin::operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
if (result)
|
||||
@@ -374,7 +374,7 @@ nsStylePadding::nsStylePadding(const nsStylePadding& aSrc) {
|
||||
}
|
||||
|
||||
void*
|
||||
nsStylePadding::operator new(size_t sz, nsIPresContext* aContext) {
|
||||
nsStylePadding::operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
if (result)
|
||||
@@ -474,7 +474,7 @@ nsStyleBorder::nsStyleBorder(const nsStyleBorder& aSrc)
|
||||
}
|
||||
|
||||
void*
|
||||
nsStyleBorder::operator new(size_t sz, nsIPresContext* aContext) {
|
||||
nsStyleBorder::operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
if (result)
|
||||
|
||||
Reference in New Issue
Block a user