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
This commit is contained in:
seawood@netscape.com
2002-07-02 20:25:30 +00:00
parent 96bc359276
commit 0ae28f14fb
86 changed files with 184 additions and 216 deletions

View File

@@ -411,7 +411,7 @@ private:
// Hide so that only Create() and Destroy() can be used to
// allocate and deallocate from the heap
static void* operator new(size_t) { return 0; }
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
static void operator delete(void*, size_t) {}
};
@@ -530,7 +530,7 @@ private:
// Hide so that only Create() and Destroy() can be used to
// allocate and deallocate from the heap
static void* operator new(size_t) { return 0; }
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
static void operator delete(void*, size_t) {}
};