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:
seawood%netscape.com
2002-07-02 20:25:30 +00:00
parent 2e8b6b11c8
commit a7c7e77b8b
87 changed files with 186 additions and 218 deletions

View File

@@ -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)