mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
4364bb25f9
commit
03ace271f0
@ -380,6 +380,8 @@ CFLAGS=$(CFLAGS) -DUSE_IMG2 -DNS_PRINT_PREVIEW
|
||||
CFLAGS=$(CFLAGS) -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT -DMOZ_STATIC_COMPONENT_LIBS
|
||||
!endif
|
||||
|
||||
CFLAGS=$(CFLAGS) -DCPP_THROW_NEW=throw()
|
||||
|
||||
#//-----------------------------------------------------------------------
|
||||
#//
|
||||
#// build tools
|
||||
|
@ -80,5 +80,6 @@
|
||||
#define _NO_FAST_STRING_INLINES_ 1
|
||||
#define _PR_NO_PREEMPT 1
|
||||
///#define HAVE_BOOLEAN 1 // used by JPEG lib
|
||||
#define CPP_THROW_NEW
|
||||
|
||||
#endif /* DefinesMac_h_ */
|
||||
|
@ -68,7 +68,7 @@ struct RuleProcessorData {
|
||||
// NOTE: not |virtual|
|
||||
~RuleProcessorData();
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
mNext->Destroy(mNext->mRuleNode->mPresContext);
|
||||
}
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -374,7 +374,7 @@ static PRBool SetColor(const nsCSSValue& aValue, const nscolor aParentColor,
|
||||
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void*
|
||||
nsRuleNode::operator new(size_t sz, nsIPresContext* aPresContext)
|
||||
nsRuleNode::operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW
|
||||
{
|
||||
// Check the recycle list first.
|
||||
void* result = nsnull;
|
||||
|
@ -1249,7 +1249,7 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out,
|
||||
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void*
|
||||
nsStyleContext::operator new(size_t sz, nsIPresContext* aPresContext)
|
||||
nsStyleContext::operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW
|
||||
{
|
||||
// Check the recycle list first.
|
||||
void* result = nsnull;
|
||||
|
@ -84,7 +84,7 @@ struct nsRuleNodeList
|
||||
:mRuleNode(aRuleNode), mNext(aNext)
|
||||
{};
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -93,7 +93,7 @@ static PRInt32 numAllocFromPool=0;
|
||||
// allocate the memory for the object from the recycler, if possible
|
||||
// otherwise, just grab it from the heap.
|
||||
void*
|
||||
nsDOMEvent::operator new(size_t aSize)
|
||||
nsDOMEvent::operator new(size_t aSize) CPP_THROW_NEW
|
||||
{
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "nsIArena.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
|
||||
void* nsCSSRule::operator new(size_t size)
|
||||
void* nsCSSRule::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
nsCSSRule* rv = (nsCSSRule*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -52,7 +52,7 @@ void* nsCSSRule::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* nsCSSRule::operator new(size_t size, nsIArena* aArena)
|
||||
void* nsCSSRule::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
nsCSSRule* rv = (nsCSSRule*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -201,7 +201,7 @@ struct RuleValue {
|
||||
}
|
||||
|
||||
// Placement new to arena allocate the RuleValues
|
||||
void *operator new(size_t aSize, PLArenaPool &aArena) {
|
||||
void *operator new(size_t aSize, PLArenaPool &aArena) CPP_THROW_NEW {
|
||||
void *mem;
|
||||
PL_ARENA_ALLOCATE(mem, &aArena, aSize);
|
||||
return mem;
|
||||
@ -1722,7 +1722,7 @@ void CSSStyleSheetInner::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSiz
|
||||
// CSS Style Sheet
|
||||
//
|
||||
|
||||
void* CSSStyleSheetImpl::operator new(size_t size)
|
||||
void* CSSStyleSheetImpl::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
CSSStyleSheetImpl* rv = (CSSStyleSheetImpl*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -1734,7 +1734,7 @@ void* CSSStyleSheetImpl::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* CSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena)
|
||||
void* CSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
CSSStyleSheetImpl* rv = (CSSStyleSheetImpl*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -286,7 +286,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size)
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
HTMLCSSStyleSheetImpl* rv = (HTMLCSSStyleSheetImpl*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -298,7 +298,7 @@ void* HTMLCSSStyleSheetImpl::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena)
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
HTMLCSSStyleSheetImpl* rv = (HTMLCSSStyleSheetImpl*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -898,7 +898,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size)
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
HTMLStyleSheetImpl* rv = (HTMLStyleSheetImpl*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -910,7 +910,7 @@ void* HTMLStyleSheetImpl::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size, nsIArena* aArena)
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
HTMLStyleSheetImpl* rv = (HTMLStyleSheetImpl*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -68,7 +68,7 @@ struct nsInheritedStyleData
|
||||
nsStyleSVG* mSVGData;
|
||||
#endif
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -142,7 +142,7 @@ struct nsResetStyleData
|
||||
#endif
|
||||
};
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -162,7 +162,7 @@ struct nsStyleColor : public nsStyleStruct {
|
||||
|
||||
PRInt32 CalcDifference(const nsStyleColor& aOther) const;
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -184,7 +184,7 @@ struct nsStyleBackground : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Background)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -504,7 +504,7 @@ struct nsStyleOutline: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Outline)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -588,7 +588,7 @@ struct nsStyleList : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_List)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -613,7 +613,7 @@ struct nsStylePosition : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Position)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -643,7 +643,7 @@ struct nsStyleTextReset : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_TextReset)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -670,7 +670,7 @@ struct nsStyleText : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Text)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -703,7 +703,7 @@ struct nsStyleVisibility : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Visibility)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -737,7 +737,7 @@ struct nsStyleDisplay : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Display)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -791,7 +791,7 @@ struct nsStyleTable: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Table)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -817,7 +817,7 @@ struct nsStyleTableBorder: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_TableBorder)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -868,7 +868,7 @@ struct nsStyleQuotes : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Quotes)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -929,7 +929,7 @@ struct nsStyleContent: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Content)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1068,7 +1068,7 @@ struct nsStyleUIReset: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_UIReset)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1093,7 +1093,7 @@ struct nsStyleUserInterface: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_UserInterface)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1121,7 +1121,7 @@ struct nsStyleXUL : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_XUL)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1160,7 +1160,7 @@ struct nsStyleSVG : public nsStyleStruct {
|
||||
nsStyleSVG(const nsStyleSVG& aSource);
|
||||
~nsStyleSVG();
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -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)
|
||||
|
@ -144,7 +144,7 @@ protected:
|
||||
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) {}
|
||||
};
|
||||
|
||||
@ -217,7 +217,7 @@ protected:
|
||||
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) {}
|
||||
};
|
||||
|
||||
|
@ -210,7 +210,7 @@ protected:
|
||||
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) {}
|
||||
};
|
||||
|
||||
|
@ -203,7 +203,7 @@ protected:
|
||||
nsAutoVoidArray mAttributes;
|
||||
private:
|
||||
// Hide so that all construction and destruction use Create and Destroy.
|
||||
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) { };
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ protected:
|
||||
aPool.Free(aItem, sizeof(*aItem)); }
|
||||
|
||||
protected:
|
||||
static void* operator new(size_t aSize, void* aPtr) {
|
||||
static void* operator new(size_t aSize, void* aPtr) CPP_THROW_NEW {
|
||||
return aPtr; }
|
||||
|
||||
static void operator delete(void* aPtr, size_t aSize) {
|
||||
|
@ -56,7 +56,7 @@ protected:
|
||||
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) {}
|
||||
|
||||
public:
|
||||
|
@ -231,7 +231,7 @@ protected:
|
||||
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) {}
|
||||
|
||||
public:
|
||||
@ -288,7 +288,7 @@ protected:
|
||||
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) {}
|
||||
|
||||
protected:
|
||||
@ -353,7 +353,7 @@ protected:
|
||||
protected:
|
||||
// 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) {}
|
||||
|
||||
public:
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
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) {}
|
||||
|
||||
public:
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
protected:
|
||||
// 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) {}
|
||||
|
||||
public:
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
protected:
|
||||
// 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) {}
|
||||
|
||||
public:
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
protected:
|
||||
// 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) {}
|
||||
|
||||
public:
|
||||
|
@ -62,7 +62,7 @@ class nsTemplateMatch {
|
||||
private:
|
||||
// Hide so that only Create() and Destroy() can be used to
|
||||
// allocate and deallocate from the heap
|
||||
void* operator new(size_t) { return 0; }
|
||||
void* operator new(size_t) CPP_THROW_NEW { return 0; }
|
||||
void operator delete(void*, size_t) {}
|
||||
|
||||
protected:
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
protected:
|
||||
// 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) { }
|
||||
|
||||
public:
|
||||
|
@ -55,7 +55,7 @@ public: // link memory management methods
|
||||
void ZapOldNext(morkEnv* ev, nsIMdbHeap* ioHeap);
|
||||
|
||||
public: // link memory management operators
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkNext::MakeNewNext(inSize, ioHeap, ev); }
|
||||
|
||||
void operator delete(void* ioAddress) // DO NOT CALL THIS, hope to crash:
|
||||
@ -151,7 +151,7 @@ public: // link memory management methods
|
||||
void ZapOldLink(morkEnv* ev, nsIMdbHeap* ioHeap);
|
||||
|
||||
public: // link memory management operators
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkLink::MakeNewLink(inSize, ioHeap, ev); }
|
||||
|
||||
};
|
||||
|
@ -204,10 +204,10 @@ public: // morkYarn construction & destruction
|
||||
|
||||
|
||||
public: // morkNode memory management operators
|
||||
void* operator new(size_t inSize)
|
||||
void* operator new(size_t inSize) CPP_THROW_NEW
|
||||
{ return ::operator new(inSize); }
|
||||
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkNode::MakeNew(inSize, ioHeap, ev); }
|
||||
|
||||
private: // copying is not allowed
|
||||
|
@ -116,13 +116,13 @@ public: // dynamic type identification
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
public: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ public: // morkNode memory management methods
|
||||
// ioHeap->Free(ev->AsMdbEnv(), this);
|
||||
|
||||
public: // morkNode memory management operators
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkNode::MakeNew(inSize, ioHeap, ev); }
|
||||
|
||||
|
||||
|
@ -118,10 +118,10 @@ public: // typing
|
||||
void NonPoolTypeError(morkEnv* ev);
|
||||
|
||||
public: // morkNode memory management operators
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkNode::MakeNew(inSize, ioHeap, ev); }
|
||||
|
||||
void* operator new(size_t inSize)
|
||||
void* operator new(size_t inSize) CPP_THROW_NEW
|
||||
{ return ::operator new(inSize); }
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ public: // sorting dirty handling more than morkNode::SetNodeDirty() etc.
|
||||
mork_bool IsSortingDirty() const { return this->IsNodeDirty(); }
|
||||
|
||||
public: // morkNode memory management operators
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkNode::MakeNew(inSize, ioHeap, ev); }
|
||||
|
||||
|
||||
|
@ -490,7 +490,7 @@ public: // table dirty handling more complex than morkNode::SetNodeDirty() etc.
|
||||
mork_bool IsTableDirty() const { return this->IsNodeDirty(); }
|
||||
|
||||
public: // morkNode memory management operators
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev)
|
||||
void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return morkNode::MakeNew(inSize, ioHeap, ev); }
|
||||
|
||||
|
||||
|
@ -87,13 +87,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -96,13 +96,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -90,13 +90,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -97,13 +97,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
public: // construction:
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -91,13 +91,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -89,13 +89,13 @@ private: // copying is not allowed
|
||||
// } ===== end morkNode methods =====
|
||||
|
||||
protected: // morkHandle memory management operators
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, &ioZone); }
|
||||
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev)
|
||||
void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
|
||||
{ return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
|
||||
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace)
|
||||
void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
|
||||
{ MORK_USED_1(inSize); return ioFace; }
|
||||
|
||||
|
||||
|
@ -142,7 +142,7 @@ void RgnRectMemoryAllocator::Free (nsRegion::RgnRect* aRect)
|
||||
static RgnRectMemoryAllocator gRectPool (INIT_MEM_CHUNK_ENTRIES);
|
||||
|
||||
|
||||
inline void* nsRegion::RgnRect::operator new (size_t)
|
||||
inline void* nsRegion::RgnRect::operator new (size_t) CPP_THROW_NEW
|
||||
{
|
||||
return gRectPool.Alloc ();
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ class CToken {
|
||||
* @param aSize -
|
||||
* @param aArena - Allocate memory from this pool.
|
||||
*/
|
||||
static void * operator new (size_t aSize,nsFixedSizeAllocator& anArena)
|
||||
static void * operator new (size_t aSize,nsFixedSizeAllocator& anArena) CPP_THROW_NEW
|
||||
{
|
||||
return anArena.Alloc(aSize);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class nsCParserNode : public nsIParserNode {
|
||||
/**
|
||||
* Hide operator new; clients should use Create() instead.
|
||||
*/
|
||||
static void* operator new(size_t) { return 0; }
|
||||
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
|
||||
|
||||
/**
|
||||
* Hide operator delete; clients should use Destroy() instead.
|
||||
|
@ -304,11 +304,7 @@ private:
|
||||
|
||||
// Not meant to be implemented. This makes it a compiler error to
|
||||
// attempt to create an XPCAutoLock object on the heap.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
static void* operator new(size_t /*size*/) throw () {
|
||||
#else
|
||||
static void* operator new(size_t /*size*/) {
|
||||
#endif
|
||||
static void* operator new(size_t /*size*/) CPP_THROW_NEW {
|
||||
return nsnull;
|
||||
}
|
||||
static void operator delete(void* /*memory*/) {}
|
||||
@ -361,11 +357,7 @@ private:
|
||||
|
||||
// Not meant to be implemented. This makes it a compiler error to
|
||||
// attempt to create an XPCAutoUnlock object on the heap.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
static void* operator new(size_t /*size*/) throw () {
|
||||
#else
|
||||
static void* operator new(size_t /*size*/) {
|
||||
#endif
|
||||
static void* operator new(size_t /*size*/) CPP_THROW_NEW {
|
||||
return nsnull;
|
||||
}
|
||||
static void operator delete(void* /*memory*/) {}
|
||||
@ -1177,7 +1169,7 @@ protected:
|
||||
{MOZ_COUNT_CTOR(XPCNativeInterface);}
|
||||
~XPCNativeInterface() {MOZ_COUNT_DTOR(XPCNativeInterface);}
|
||||
|
||||
void* operator new(size_t, void* p) {return p;}
|
||||
void* operator new(size_t, void* p) CPP_THROW_NEW {return p;}
|
||||
|
||||
XPCNativeInterface(const XPCNativeInterface& r); // not implemented
|
||||
XPCNativeInterface& operator= (const XPCNativeInterface& r); // not implemented
|
||||
@ -1316,7 +1308,7 @@ protected:
|
||||
PRUint16 position);
|
||||
XPCNativeSet() {MOZ_COUNT_CTOR(XPCNativeSet);}
|
||||
~XPCNativeSet() {MOZ_COUNT_DTOR(XPCNativeSet);}
|
||||
void* operator new(size_t, void* p) {return p;}
|
||||
void* operator new(size_t, void* p) CPP_THROW_NEW {return p;}
|
||||
|
||||
private:
|
||||
PRUint16 mMemberCount;
|
||||
|
@ -131,7 +131,7 @@ nsSpaceManager::~nsSpaceManager()
|
||||
}
|
||||
|
||||
// static
|
||||
void* nsSpaceManager::operator new(size_t aSize)
|
||||
void* nsSpaceManager::operator new(size_t aSize) CPP_THROW_NEW
|
||||
{
|
||||
if (sCachedSpaceManagerCount > 0) {
|
||||
// We have cached unused instances of this class, return a cached
|
||||
|
@ -81,7 +81,7 @@ nsDirectionalFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
}
|
||||
|
||||
void*
|
||||
nsDirectionalFrame::operator new(size_t aSize)
|
||||
nsDirectionalFrame::operator new(size_t aSize) CPP_THROW_NEW
|
||||
{
|
||||
void* frame = ::operator new(aSize);
|
||||
if (frame) {
|
||||
|
@ -265,7 +265,7 @@ MOZ_DECL_CTOR_COUNTER(nsFrame)
|
||||
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void*
|
||||
nsFrame::operator new(size_t sz, nsIPresShell* aPresShell)
|
||||
nsFrame::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW
|
||||
{
|
||||
// Check the recycle list first.
|
||||
void* result = nsnull;
|
||||
|
@ -147,11 +147,7 @@ public:
|
||||
|
||||
private:
|
||||
// The normal operator new is disallowed on nsFrames.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
void* operator new(size_t sz) throw () { return nsnull; };
|
||||
#else
|
||||
void* operator new(size_t sz) { return nsnull; };
|
||||
#endif
|
||||
void* operator new(size_t sz) CPP_THROW_NEW { return nsnull; };
|
||||
|
||||
public:
|
||||
|
||||
|
@ -94,7 +94,7 @@ NS_NewLineBox(nsIPresShell* aPresShell, nsIFrame* aFrame,
|
||||
// Overloaded new operator. Uses an arena (which comes from the presShell)
|
||||
// to perform the allocation.
|
||||
void*
|
||||
nsLineBox::operator new(size_t sz, nsIPresShell* aPresShell)
|
||||
nsLineBox::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW
|
||||
{
|
||||
void* result = nsnull;
|
||||
aPresShell->AllocateFrame(sz, &result);
|
||||
|
@ -131,7 +131,7 @@ nsSpaceManager::~nsSpaceManager()
|
||||
}
|
||||
|
||||
// static
|
||||
void* nsSpaceManager::operator new(size_t aSize)
|
||||
void* nsSpaceManager::operator new(size_t aSize) CPP_THROW_NEW
|
||||
{
|
||||
if (sCachedSpaceManagerCount > 0) {
|
||||
// We have cached unused instances of this class, return a cached
|
||||
|
@ -81,7 +81,7 @@ nsDirectionalFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
}
|
||||
|
||||
void*
|
||||
nsDirectionalFrame::operator new(size_t aSize)
|
||||
nsDirectionalFrame::operator new(size_t aSize) CPP_THROW_NEW
|
||||
{
|
||||
void* frame = ::operator new(aSize);
|
||||
if (frame) {
|
||||
|
@ -265,7 +265,7 @@ MOZ_DECL_CTOR_COUNTER(nsFrame)
|
||||
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void*
|
||||
nsFrame::operator new(size_t sz, nsIPresShell* aPresShell)
|
||||
nsFrame::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW
|
||||
{
|
||||
// Check the recycle list first.
|
||||
void* result = nsnull;
|
||||
|
@ -147,11 +147,7 @@ public:
|
||||
|
||||
private:
|
||||
// The normal operator new is disallowed on nsFrames.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
void* operator new(size_t sz) throw () { return nsnull; };
|
||||
#else
|
||||
void* operator new(size_t sz) { return nsnull; };
|
||||
#endif
|
||||
void* operator new(size_t sz) CPP_THROW_NEW { return nsnull; };
|
||||
|
||||
public:
|
||||
|
||||
|
@ -94,7 +94,7 @@ NS_NewLineBox(nsIPresShell* aPresShell, nsIFrame* aFrame,
|
||||
// Overloaded new operator. Uses an arena (which comes from the presShell)
|
||||
// to perform the allocation.
|
||||
void*
|
||||
nsLineBox::operator new(size_t sz, nsIPresShell* aPresShell)
|
||||
nsLineBox::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW
|
||||
{
|
||||
void* result = nsnull;
|
||||
aPresShell->AllocateFrame(sz, &result);
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "nsIArena.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
|
||||
void* nsCSSRule::operator new(size_t size)
|
||||
void* nsCSSRule::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
nsCSSRule* rv = (nsCSSRule*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -52,7 +52,7 @@ void* nsCSSRule::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* nsCSSRule::operator new(size_t size, nsIArena* aArena)
|
||||
void* nsCSSRule::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
nsCSSRule* rv = (nsCSSRule*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -201,7 +201,7 @@ struct RuleValue {
|
||||
}
|
||||
|
||||
// Placement new to arena allocate the RuleValues
|
||||
void *operator new(size_t aSize, PLArenaPool &aArena) {
|
||||
void *operator new(size_t aSize, PLArenaPool &aArena) CPP_THROW_NEW {
|
||||
void *mem;
|
||||
PL_ARENA_ALLOCATE(mem, &aArena, aSize);
|
||||
return mem;
|
||||
@ -1722,7 +1722,7 @@ void CSSStyleSheetInner::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSiz
|
||||
// CSS Style Sheet
|
||||
//
|
||||
|
||||
void* CSSStyleSheetImpl::operator new(size_t size)
|
||||
void* CSSStyleSheetImpl::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
CSSStyleSheetImpl* rv = (CSSStyleSheetImpl*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -1734,7 +1734,7 @@ void* CSSStyleSheetImpl::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* CSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena)
|
||||
void* CSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
CSSStyleSheetImpl* rv = (CSSStyleSheetImpl*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -286,7 +286,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size)
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
HTMLCSSStyleSheetImpl* rv = (HTMLCSSStyleSheetImpl*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -298,7 +298,7 @@ void* HTMLCSSStyleSheetImpl::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena)
|
||||
void* HTMLCSSStyleSheetImpl::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
HTMLCSSStyleSheetImpl* rv = (HTMLCSSStyleSheetImpl*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -898,7 +898,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size)
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
HTMLStyleSheetImpl* rv = (HTMLStyleSheetImpl*) ::operator new(size);
|
||||
#ifdef NS_DEBUG
|
||||
@ -910,7 +910,7 @@ void* HTMLStyleSheetImpl::operator new(size_t size)
|
||||
return (void*) rv;
|
||||
}
|
||||
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size, nsIArena* aArena)
|
||||
void* HTMLStyleSheetImpl::operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW
|
||||
{
|
||||
HTMLStyleSheetImpl* rv = (HTMLStyleSheetImpl*) aArena->Alloc(PRInt32(size));
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -68,7 +68,7 @@ struct RuleProcessorData {
|
||||
// NOTE: not |virtual|
|
||||
~RuleProcessorData();
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
mNext->Destroy(mNext->mRuleNode->mPresContext);
|
||||
}
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -374,7 +374,7 @@ static PRBool SetColor(const nsCSSValue& aValue, const nscolor aParentColor,
|
||||
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void*
|
||||
nsRuleNode::operator new(size_t sz, nsIPresContext* aPresContext)
|
||||
nsRuleNode::operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW
|
||||
{
|
||||
// Check the recycle list first.
|
||||
void* result = nsnull;
|
||||
|
@ -68,7 +68,7 @@ struct nsInheritedStyleData
|
||||
nsStyleSVG* mSVGData;
|
||||
#endif
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -142,7 +142,7 @@ struct nsResetStyleData
|
||||
#endif
|
||||
};
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -1249,7 +1249,7 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out,
|
||||
// Overloaded new operator. Initializes the memory to 0 and relies on an arena
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void*
|
||||
nsStyleContext::operator new(size_t sz, nsIPresContext* aPresContext)
|
||||
nsStyleContext::operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW
|
||||
{
|
||||
// Check the recycle list first.
|
||||
void* result = nsnull;
|
||||
|
@ -84,7 +84,7 @@ struct nsRuleNodeList
|
||||
:mRuleNode(aRuleNode), mNext(aNext)
|
||||
{};
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -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)
|
||||
|
@ -162,7 +162,7 @@ struct nsStyleColor : public nsStyleStruct {
|
||||
|
||||
PRInt32 CalcDifference(const nsStyleColor& aOther) const;
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -184,7 +184,7 @@ struct nsStyleBackground : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Background)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -504,7 +504,7 @@ struct nsStyleOutline: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Outline)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -588,7 +588,7 @@ struct nsStyleList : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_List)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -613,7 +613,7 @@ struct nsStylePosition : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Position)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -643,7 +643,7 @@ struct nsStyleTextReset : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_TextReset)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -670,7 +670,7 @@ struct nsStyleText : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Text)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -703,7 +703,7 @@ struct nsStyleVisibility : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Visibility)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -737,7 +737,7 @@ struct nsStyleDisplay : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Display)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -791,7 +791,7 @@ struct nsStyleTable: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Table)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -817,7 +817,7 @@ struct nsStyleTableBorder: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_TableBorder)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -868,7 +868,7 @@ struct nsStyleQuotes : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Quotes)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -929,7 +929,7 @@ struct nsStyleContent: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Content)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1068,7 +1068,7 @@ struct nsStyleUIReset: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_UIReset)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1093,7 +1093,7 @@ struct nsStyleUserInterface: public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_UserInterface)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1121,7 +1121,7 @@ struct nsStyleXUL : public nsStyleStruct {
|
||||
|
||||
NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_XUL)
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
@ -1160,7 +1160,7 @@ struct nsStyleSVG : public nsStyleStruct {
|
||||
nsStyleSVG(const nsStyleSVG& aSource);
|
||||
~nsStyleSVG();
|
||||
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) {
|
||||
void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW {
|
||||
void* result = nsnull;
|
||||
aContext->AllocateFromShell(sz, &result);
|
||||
return result;
|
||||
|
@ -2226,7 +2226,7 @@ nsBoxFrame::GetContentOf(nsIContent** aContent)
|
||||
|
||||
|
||||
void*
|
||||
nsBoxFrameInner::operator new(size_t sz, nsIPresShell* aPresShell)
|
||||
nsBoxFrameInner::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW
|
||||
{
|
||||
return nsBoxLayoutState::Allocate(sz,aPresShell);
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ nsBoxToBlockAdaptor::SetStyleChangeFlag(PRBool aDirty)
|
||||
|
||||
|
||||
void*
|
||||
nsBoxToBlockAdaptor::operator new(size_t sz, nsIPresShell* aPresShell)
|
||||
nsBoxToBlockAdaptor::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW
|
||||
{
|
||||
return nsBoxLayoutState::Allocate(sz,aPresShell);
|
||||
}
|
||||
|
@ -1709,7 +1709,7 @@ nsBoxSize::Clear()
|
||||
|
||||
|
||||
void*
|
||||
nsBoxSize::operator new(size_t sz, nsBoxLayoutState& aState)
|
||||
nsBoxSize::operator new(size_t sz, nsBoxLayoutState& aState) CPP_THROW_NEW
|
||||
{
|
||||
void* mem = 0;
|
||||
aState.AllocateStackMemory(sz,&mem);
|
||||
@ -1724,7 +1724,7 @@ nsBoxSize::operator delete(void* aPtr, size_t sz)
|
||||
|
||||
|
||||
void*
|
||||
nsComputedBoxSize::operator new(size_t sz, nsBoxLayoutState& aState)
|
||||
nsComputedBoxSize::operator new(size_t sz, nsBoxLayoutState& aState) CPP_THROW_NEW
|
||||
{
|
||||
|
||||
void* mem = 0;
|
||||
|
@ -142,7 +142,7 @@ class Row
|
||||
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) {}
|
||||
|
||||
// State flags
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "nsCRT.h"
|
||||
|
||||
#if defined(XP_OS2) && defined(__DEBUG_ALLOC__)
|
||||
void* nsMsgZapIt::operator new(size_t size, const char *file, size_t line) {
|
||||
void* nsMsgZapIt::operator new(size_t size, const char *file, size_t line) CPP_THROW_NEW {
|
||||
void* rv = ::operator new(size, file, line);
|
||||
if (rv) {
|
||||
memset(rv, 0, size);
|
||||
@ -47,7 +47,7 @@ void* nsMsgZapIt::operator new(size_t size, const char *file, size_t line) {
|
||||
return rv;
|
||||
}
|
||||
#else
|
||||
void* nsMsgZapIt::operator new(size_t size) {
|
||||
void* nsMsgZapIt::operator new(size_t size) CPP_THROW_NEW {
|
||||
void* rv = ::operator new(size);
|
||||
if (rv) {
|
||||
memset(rv, 0, size);
|
||||
|
@ -122,7 +122,7 @@ class CToken {
|
||||
* @param aSize -
|
||||
* @param aArena - Allocate memory from this pool.
|
||||
*/
|
||||
static void * operator new (size_t aSize,nsFixedSizeAllocator& anArena)
|
||||
static void * operator new (size_t aSize,nsFixedSizeAllocator& anArena) CPP_THROW_NEW
|
||||
{
|
||||
return anArena.Alloc(aSize);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class nsCParserNode : public nsIParserNode {
|
||||
/**
|
||||
* Hide operator new; clients should use Create() instead.
|
||||
*/
|
||||
static void* operator new(size_t) { return 0; }
|
||||
static void* operator new(size_t) CPP_THROW_NEW { return 0; }
|
||||
|
||||
/**
|
||||
* Hide operator delete; clients should use Destroy() instead.
|
||||
|
@ -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) {}
|
||||
};
|
||||
|
||||
|
@ -188,7 +188,7 @@ public:
|
||||
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) {}
|
||||
};
|
||||
|
||||
@ -420,7 +420,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) {}
|
||||
|
||||
InMemoryAssertionEnumeratorImpl(InMemoryDataSource* aDataSource,
|
||||
@ -616,7 +616,7 @@ class InMemoryArcsEnumeratorImpl : public nsISimpleEnumerator
|
||||
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) {}
|
||||
|
||||
InMemoryDataSource* mDataSource;
|
||||
|
@ -708,10 +708,7 @@ void leaky::dumpLeakTree(TreeNode* aNode, int aIndent)
|
||||
|
||||
TreeNode* TreeNode::freeList;
|
||||
|
||||
void* TreeNode::operator new(size_t size)
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
throw()
|
||||
#endif
|
||||
void* TreeNode::operator new(size_t size) CPP_THROW_NEW
|
||||
{
|
||||
if (!freeList) {
|
||||
TreeNode* newNodes = (TreeNode*) new char[sizeof(TreeNode) * 5000];
|
||||
|
@ -50,11 +50,7 @@ struct TreeNode {
|
||||
u_long bytesLeaked;
|
||||
u_long descendantBytesLeaked;
|
||||
|
||||
void* operator new(size_t size)
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
throw()
|
||||
#endif
|
||||
;
|
||||
void* operator new(size_t size) CPP_THROW_NEW ;
|
||||
void operator delete(void* ptr);
|
||||
|
||||
static TreeNode* freeList;
|
||||
|
@ -202,7 +202,7 @@ PermanentAtomImpl::IsPermanent()
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void* AtomImpl::operator new ( size_t size, const nsAString& aString )
|
||||
void* AtomImpl::operator new ( size_t size, const nsAString& aString ) CPP_THROW_NEW
|
||||
{
|
||||
/*
|
||||
Note: since the |size| will initially also include the |PRUnichar| member
|
||||
@ -222,7 +222,7 @@ void* AtomImpl::operator new ( size_t size, const nsAString& aString )
|
||||
return ii;
|
||||
}
|
||||
|
||||
void* PermanentAtomImpl::operator new ( size_t size, AtomImpl* aAtom ) {
|
||||
void* PermanentAtomImpl::operator new ( size_t size, AtomImpl* aAtom ) CPP_THROW_NEW {
|
||||
NS_ASSERTION(!aAtom->IsPermanent(),
|
||||
"converting atom that's already permanent");
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
|
||||
virtual PRBool IsPermanent();
|
||||
|
||||
void* operator new(size_t size, const nsAString& aString) {
|
||||
void* operator new(size_t size, const nsAString& aString) CPP_THROW_NEW {
|
||||
return AtomImpl::operator new(size, aString);
|
||||
}
|
||||
void* operator new(size_t size, AtomImpl* aAtom);
|
||||
|
@ -64,7 +64,7 @@ extern const PRUnichar kIsoLatin1ToUCS2[256];
|
||||
// This macro can be used in a class declaration for classes that want
|
||||
// to ensure that their instance memory is zeroed.
|
||||
#define NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW \
|
||||
void* operator new(size_t sz) { \
|
||||
void* operator new(size_t sz) CPP_THROW_NEW { \
|
||||
void* rv = ::operator new(sz); \
|
||||
if (rv) { \
|
||||
memset(rv, 0, sz); \
|
||||
@ -82,7 +82,7 @@ extern const PRUnichar kIsoLatin1ToUCS2[256];
|
||||
void operator delete(void* ptr);
|
||||
|
||||
#define NS_IMPL_ZEROING_OPERATOR_NEW(_class) \
|
||||
void* _class::operator new(size_t sz) { \
|
||||
void* _class::operator new(size_t sz) CPP_THROW_NEW { \
|
||||
void* rv = ::operator new(sz); \
|
||||
if (rv) { \
|
||||
memset(rv, 0, sz); \
|
||||
|
@ -173,7 +173,7 @@ private:
|
||||
xptiTypelibGuts(); // not implemented
|
||||
xptiTypelibGuts(XPTHeader* aHeader);
|
||||
~xptiTypelibGuts() {}
|
||||
void* operator new(size_t, void* p) {return p;}
|
||||
void* operator new(size_t, void* p) CPP_THROW_NEW {return p;}
|
||||
|
||||
private:
|
||||
XPTHeader* mHeader; // hold pointer into arena
|
||||
@ -467,7 +467,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void* operator new(size_t, void* p) {return p;}
|
||||
void* operator new(size_t, void* p) CPP_THROW_NEW {return p;}
|
||||
xptiInterfaceGuts(XPTInterfaceDescriptor* aDescriptor,
|
||||
const xptiTypelib& aTypelib,
|
||||
xptiWorkingSet* aWorkingSet)
|
||||
@ -639,7 +639,7 @@ private:
|
||||
const xptiTypelib& typelib);
|
||||
~xptiInterfaceEntry();
|
||||
|
||||
void* operator new(size_t, void* p) {return p;}
|
||||
void* operator new(size_t, void* p) CPP_THROW_NEW {return p;}
|
||||
|
||||
void SetResolvedState(int state)
|
||||
{mFlags.SetState(uint8(state));}
|
||||
|
@ -152,11 +152,7 @@ private:
|
||||
|
||||
// Not meant to be implemented. This makes it a compiler error to
|
||||
// attempt to create an nsAutoLock object on the heap.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
static void* operator new(size_t /*size*/) throw () {
|
||||
#else
|
||||
static void* operator new(size_t /*size*/) {
|
||||
#endif
|
||||
static void* operator new(size_t /*size*/) CPP_THROW_NEW {
|
||||
return nsnull;
|
||||
}
|
||||
static void operator delete(void* /*memory*/) {}
|
||||
@ -313,11 +309,7 @@ private:
|
||||
|
||||
// Not meant to be implemented. This makes it a compiler error to
|
||||
// attempt to create an nsAutoLock object on the heap.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
static void* operator new(size_t /*size*/) throw () {
|
||||
#else
|
||||
static void* operator new(size_t /*size*/) {
|
||||
#endif
|
||||
static void* operator new(size_t /*size*/) CPP_THROW_NEW {
|
||||
return nsnull;
|
||||
}
|
||||
static void operator delete(void* /*memory*/) {}
|
||||
@ -384,11 +376,7 @@ private:
|
||||
|
||||
// Not meant to be implemented. This makes it a compiler error to
|
||||
// attempt to create an nsAutoLock object on the heap.
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
static void* operator new(size_t /*size*/) throw() {
|
||||
#else
|
||||
static void* operator new(size_t /*size*/) {
|
||||
#endif
|
||||
static void* operator new(size_t /*size*/) CPP_THROW_NEW {
|
||||
return nsnull;
|
||||
}
|
||||
static void operator delete(void* /*memory*/) {}
|
||||
|
@ -453,7 +453,7 @@ public:
|
||||
~nsThreadPoolBusyBody();
|
||||
|
||||
private:
|
||||
void* operator new(size_t) { return 0; } // local variable, only!
|
||||
void* operator new(size_t) CPP_THROW_NEW { return 0; } // local variable, only!
|
||||
nsThreadPool *mPool;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user