diff --git a/mozilla/content/base/src/nsStyleContext.cpp b/mozilla/content/base/src/nsStyleContext.cpp index 4eea9ad0fff..8d6aebc399f 100644 --- a/mozilla/content/base/src/nsStyleContext.cpp +++ b/mozilla/content/base/src/nsStyleContext.cpp @@ -68,7 +68,7 @@ public: nsRuleNode* aRuleNode, nsIPresContext* aPresContext); virtual ~nsStyleContext(); - void* operator new(size_t sz, nsIPresContext* aPresContext); + void* operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW; void Destroy(); NS_DECL_ISUPPORTS diff --git a/mozilla/content/events/src/nsDOMEvent.h b/mozilla/content/events/src/nsDOMEvent.h index 9cb86987a41..dc1f45b0d13 100644 --- a/mozilla/content/events/src/nsDOMEvent.h +++ b/mozilla/content/events/src/nsDOMEvent.h @@ -202,7 +202,7 @@ public: * Relies on a recycler to perform the allocation, * optionally from a pool. */ - void* operator new(size_t sz); + void* operator new(size_t sz) CPP_THROW_NEW; /** Overloaded delete operator. Relies on a recycler to either * recycle the object or call the global delete operator, as needed. diff --git a/mozilla/content/html/style/src/nsCSSRule.h b/mozilla/content/html/style/src/nsCSSRule.h index 92c45a9667d..5e4c5e6c321 100644 --- a/mozilla/content/html/style/src/nsCSSRule.h +++ b/mozilla/content/html/style/src/nsCSSRule.h @@ -49,8 +49,8 @@ class nsICSSGroupRule; class nsCSSRule { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); nsCSSRule(void); diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index c530259e6b2..7ae6649d68b 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -818,8 +818,8 @@ class CSSStyleSheetImpl : public nsICSSStyleSheet, public nsIDOMCSSStyleSheet { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); CSSStyleSheetImpl(); diff --git a/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp index 99131ec6756..d80d647ec45 100644 --- a/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp @@ -211,8 +211,8 @@ CSSFirstLetterRule::CSSFirstLetterRule(nsIHTMLCSSStyleSheet* aSheet) class HTMLCSSStyleSheetImpl : public nsIHTMLCSSStyleSheet, public nsIStyleRuleProcessor { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); HTMLCSSStyleSheetImpl(); diff --git a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp index 095443e8e2c..ea133b7af38 100644 --- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp @@ -800,8 +800,8 @@ nsHashKey* AttributeKey::Clone(void) const class HTMLStyleSheetImpl : public nsIHTMLStyleSheet, public nsIStyleRuleProcessor { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); HTMLStyleSheetImpl(void); diff --git a/mozilla/content/shared/public/nsRuleNode.h b/mozilla/content/shared/public/nsRuleNode.h index de717bb8617..bd5b4cb8d36 100644 --- a/mozilla/content/shared/public/nsRuleNode.h +++ b/mozilla/content/shared/public/nsRuleNode.h @@ -437,7 +437,7 @@ friend struct nsRuleList; public: // Overloaded new operator. Initializes the memory to 0 and relies on an arena // (which comes from the presShell) to perform the allocation. - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(); static nsILanguageAtomService *gLangService; diff --git a/mozilla/content/shared/public/nsStyleStruct.h b/mozilla/content/shared/public/nsStyleStruct.h index 39c530afc3d..3f48904b93d 100644 --- a/mozilla/content/shared/public/nsStyleStruct.h +++ b/mozilla/content/shared/public/nsStyleStruct.h @@ -45,7 +45,6 @@ #include "nsFont.h" #include "nsVoidArray.h" #include "nsStyleCoord.h" -#include "nsStyleStruct.h" #include "nsStyleConsts.h" #include "nsIStyleSet.h" #include "nsIPresContext.h" @@ -138,7 +137,7 @@ struct nsStyleFont : public nsStyleStruct { PRInt32 CalcDifference(const nsStyleFont& aOther) const; static PRInt32 CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2); - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); PRUint8 mFlags; // [inherited] See nsStyleConsts.h @@ -228,7 +227,7 @@ struct nsStyleMargin: public nsStyleStruct { NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Margin) - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); void RecalcData(); @@ -261,7 +260,7 @@ struct nsStylePadding: public nsStyleStruct { NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Padding) - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); void RecalcData(); @@ -338,7 +337,7 @@ struct nsStyleBorder: public nsStyleStruct { NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Border) - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); PRBool IsBorderSideVisible(PRUint8 aSide) const; diff --git a/mozilla/content/shared/src/nsStyleStruct.cpp b/mozilla/content/shared/src/nsStyleStruct.cpp index 22381d99ced..9b4a100eb39 100644 --- a/mozilla/content/shared/src/nsStyleStruct.cpp +++ b/mozilla/content/shared/src/nsStyleStruct.cpp @@ -37,6 +37,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsStyleStruct.h" #include "nsStyleConsts.h" #include "nsString.h" #include "nsUnitConversion.h" diff --git a/mozilla/gfx/src/nsRegion.h b/mozilla/gfx/src/nsRegion.h index 0e09f7ddda3..f9bb2185a16 100644 --- a/mozilla/gfx/src/nsRegion.h +++ b/mozilla/gfx/src/nsRegion.h @@ -96,7 +96,7 @@ class nsRegion RgnRect (PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) : nsRectFast (aX, aY, aWidth, aHeight) {} RgnRect (const nsRectFast& aRect) : nsRectFast (aRect) {} - inline void* operator new (size_t); + inline void* operator new (size_t) CPP_THROW_NEW; inline void operator delete (void* aRect, size_t); RgnRect& operator = (const RgnRect& aRect) // Do not overwrite prev/next pointers { diff --git a/mozilla/layout/base/src/nsSpaceManager.h b/mozilla/layout/base/src/nsSpaceManager.h index 1505628ad5b..2441fabbe3c 100644 --- a/mozilla/layout/base/src/nsSpaceManager.h +++ b/mozilla/layout/base/src/nsSpaceManager.h @@ -162,7 +162,7 @@ public: nsSpaceManager(nsIPresShell* aPresShell, nsIFrame* aFrame); ~nsSpaceManager(); - void* operator new(size_t aSize); + void* operator new(size_t aSize) CPP_THROW_NEW; void operator delete(void* aPtr, size_t aSize); static void Shutdown(); diff --git a/mozilla/layout/generic/nsBidiFrames.h b/mozilla/layout/generic/nsBidiFrames.h index b60d4079d7e..d2b9d663916 100644 --- a/mozilla/layout/generic/nsBidiFrames.h +++ b/mozilla/layout/generic/nsBidiFrames.h @@ -44,7 +44,7 @@ protected: public: nsDirectionalFrame(PRUnichar aChar); - void* operator new(size_t aSize); + void* operator new(size_t aSize) CPP_THROW_NEW; static const nsIID& GetIID(); diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index c5a10feec0a..84adffee80b 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -137,7 +137,7 @@ public: // Overloaded new operator. Initializes the memory to 0 and relies on an arena // (which comes from the presShell) to perform the allocation. - void* operator new(size_t sz, nsIPresShell* aPresShell); + void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; // Overridden to prevent the global delete from being called, since the memory // came out of an nsIArena instead of the global delete operator's heap. diff --git a/mozilla/layout/generic/nsLineBox.h b/mozilla/layout/generic/nsLineBox.h index e710870b621..2f869a1cfda 100644 --- a/mozilla/layout/generic/nsLineBox.h +++ b/mozilla/layout/generic/nsLineBox.h @@ -208,7 +208,7 @@ private: // Overloaded new operator. Uses an arena (which comes from the presShell) // to perform the allocation. - void* operator new(size_t sz, nsIPresShell* aPresShell); + void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; void operator delete(void* aPtr, size_t sz); public: diff --git a/mozilla/layout/generic/nsSpaceManager.h b/mozilla/layout/generic/nsSpaceManager.h index 1505628ad5b..2441fabbe3c 100644 --- a/mozilla/layout/generic/nsSpaceManager.h +++ b/mozilla/layout/generic/nsSpaceManager.h @@ -162,7 +162,7 @@ public: nsSpaceManager(nsIPresShell* aPresShell, nsIFrame* aFrame); ~nsSpaceManager(); - void* operator new(size_t aSize); + void* operator new(size_t aSize) CPP_THROW_NEW; void operator delete(void* aPtr, size_t aSize); static void Shutdown(); diff --git a/mozilla/layout/html/base/src/nsBidiFrames.h b/mozilla/layout/html/base/src/nsBidiFrames.h index b60d4079d7e..d2b9d663916 100644 --- a/mozilla/layout/html/base/src/nsBidiFrames.h +++ b/mozilla/layout/html/base/src/nsBidiFrames.h @@ -44,7 +44,7 @@ protected: public: nsDirectionalFrame(PRUnichar aChar); - void* operator new(size_t aSize); + void* operator new(size_t aSize) CPP_THROW_NEW; static const nsIID& GetIID(); diff --git a/mozilla/layout/html/base/src/nsFrame.h b/mozilla/layout/html/base/src/nsFrame.h index c5a10feec0a..84adffee80b 100644 --- a/mozilla/layout/html/base/src/nsFrame.h +++ b/mozilla/layout/html/base/src/nsFrame.h @@ -137,7 +137,7 @@ public: // Overloaded new operator. Initializes the memory to 0 and relies on an arena // (which comes from the presShell) to perform the allocation. - void* operator new(size_t sz, nsIPresShell* aPresShell); + void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; // Overridden to prevent the global delete from being called, since the memory // came out of an nsIArena instead of the global delete operator's heap. diff --git a/mozilla/layout/html/base/src/nsLineBox.h b/mozilla/layout/html/base/src/nsLineBox.h index e710870b621..2f869a1cfda 100644 --- a/mozilla/layout/html/base/src/nsLineBox.h +++ b/mozilla/layout/html/base/src/nsLineBox.h @@ -208,7 +208,7 @@ private: // Overloaded new operator. Uses an arena (which comes from the presShell) // to perform the allocation. - void* operator new(size_t sz, nsIPresShell* aPresShell); + void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; void operator delete(void* aPtr, size_t sz); public: diff --git a/mozilla/layout/style/nsCSSRule.h b/mozilla/layout/style/nsCSSRule.h index 92c45a9667d..5e4c5e6c321 100644 --- a/mozilla/layout/style/nsCSSRule.h +++ b/mozilla/layout/style/nsCSSRule.h @@ -49,8 +49,8 @@ class nsICSSGroupRule; class nsCSSRule { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); nsCSSRule(void); diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index c530259e6b2..7ae6649d68b 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -818,8 +818,8 @@ class CSSStyleSheetImpl : public nsICSSStyleSheet, public nsIDOMCSSStyleSheet { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); CSSStyleSheetImpl(); diff --git a/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp b/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp index 99131ec6756..d80d647ec45 100644 --- a/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp @@ -211,8 +211,8 @@ CSSFirstLetterRule::CSSFirstLetterRule(nsIHTMLCSSStyleSheet* aSheet) class HTMLCSSStyleSheetImpl : public nsIHTMLCSSStyleSheet, public nsIStyleRuleProcessor { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); HTMLCSSStyleSheetImpl(); diff --git a/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp index 095443e8e2c..ea133b7af38 100644 --- a/mozilla/layout/style/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLStyleSheet.cpp @@ -800,8 +800,8 @@ nsHashKey* AttributeKey::Clone(void) const class HTMLStyleSheetImpl : public nsIHTMLStyleSheet, public nsIStyleRuleProcessor { public: - void* operator new(size_t size); - void* operator new(size_t size, nsIArena* aArena); + void* operator new(size_t size) CPP_THROW_NEW; + void* operator new(size_t size, nsIArena* aArena) CPP_THROW_NEW; void operator delete(void* ptr); HTMLStyleSheetImpl(void); diff --git a/mozilla/layout/style/nsRuleNode.h b/mozilla/layout/style/nsRuleNode.h index de717bb8617..bd5b4cb8d36 100644 --- a/mozilla/layout/style/nsRuleNode.h +++ b/mozilla/layout/style/nsRuleNode.h @@ -437,7 +437,7 @@ friend struct nsRuleList; public: // Overloaded new operator. Initializes the memory to 0 and relies on an arena // (which comes from the presShell) to perform the allocation. - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(); static nsILanguageAtomService *gLangService; diff --git a/mozilla/layout/style/nsStyleContext.cpp b/mozilla/layout/style/nsStyleContext.cpp index 4eea9ad0fff..8d6aebc399f 100644 --- a/mozilla/layout/style/nsStyleContext.cpp +++ b/mozilla/layout/style/nsStyleContext.cpp @@ -68,7 +68,7 @@ public: nsRuleNode* aRuleNode, nsIPresContext* aPresContext); virtual ~nsStyleContext(); - void* operator new(size_t sz, nsIPresContext* aPresContext); + void* operator new(size_t sz, nsIPresContext* aPresContext) CPP_THROW_NEW; void Destroy(); NS_DECL_ISUPPORTS diff --git a/mozilla/layout/style/nsStyleStruct.cpp b/mozilla/layout/style/nsStyleStruct.cpp index 22381d99ced..9b4a100eb39 100644 --- a/mozilla/layout/style/nsStyleStruct.cpp +++ b/mozilla/layout/style/nsStyleStruct.cpp @@ -37,6 +37,7 @@ * * ***** END LICENSE BLOCK ***** */ +#include "nsStyleStruct.h" #include "nsStyleConsts.h" #include "nsString.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/style/nsStyleStruct.h b/mozilla/layout/style/nsStyleStruct.h index 39c530afc3d..3f48904b93d 100644 --- a/mozilla/layout/style/nsStyleStruct.h +++ b/mozilla/layout/style/nsStyleStruct.h @@ -45,7 +45,6 @@ #include "nsFont.h" #include "nsVoidArray.h" #include "nsStyleCoord.h" -#include "nsStyleStruct.h" #include "nsStyleConsts.h" #include "nsIStyleSet.h" #include "nsIPresContext.h" @@ -138,7 +137,7 @@ struct nsStyleFont : public nsStyleStruct { PRInt32 CalcDifference(const nsStyleFont& aOther) const; static PRInt32 CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2); - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); PRUint8 mFlags; // [inherited] See nsStyleConsts.h @@ -228,7 +227,7 @@ struct nsStyleMargin: public nsStyleStruct { NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Margin) - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); void RecalcData(); @@ -261,7 +260,7 @@ struct nsStylePadding: public nsStyleStruct { NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Padding) - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); void RecalcData(); @@ -338,7 +337,7 @@ struct nsStyleBorder: public nsStyleStruct { NS_DEFINE_STATIC_STYLESTRUCTID_ACCESSOR(eStyleStruct_Border) - void* operator new(size_t sz, nsIPresContext* aContext); + void* operator new(size_t sz, nsIPresContext* aContext) CPP_THROW_NEW; void Destroy(nsIPresContext* aContext); PRBool IsBorderSideVisible(PRUint8 aSide) const; diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index e8252869be4..12c8123d9e1 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -146,7 +146,7 @@ public: // Overloaded new operator. Initializes the memory to 0 and relies on an arena // (which comes from the presShell) to perform the allocation. - void* operator new(size_t sz, nsIPresShell* aPresShell); + void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; // Overridden to prevent the global delete from being called, since the memory // came out of an nsIArena instead of the global delete operator's heap. diff --git a/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.h b/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.h index 40d1c8cd5cd..4a7c103fdeb 100644 --- a/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.h +++ b/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.h @@ -62,7 +62,7 @@ public: NS_IMETHOD Recycle(nsIPresShell* aPresShell); - void* operator new(size_t sz, nsIPresShell* aPresShell); + void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW; void operator delete(void* aPtr, size_t sz); diff --git a/mozilla/layout/xul/base/src/nsSprocketLayout.h b/mozilla/layout/xul/base/src/nsSprocketLayout.h index 3f2a50eee54..c37722d4dd5 100644 --- a/mozilla/layout/xul/base/src/nsSprocketLayout.h +++ b/mozilla/layout/xul/base/src/nsSprocketLayout.h @@ -68,7 +68,7 @@ public: PRBool aIsHorizontal); void Add(const nsMargin& aMargin, PRBool aIsHorizontal); - void* operator new(size_t sz, nsBoxLayoutState& aState); + void* operator new(size_t sz, nsBoxLayoutState& aState) CPP_THROW_NEW; void operator delete(void* aPtr, size_t sz); }; @@ -84,7 +84,7 @@ public: nsComputedBoxSize* next; void Clear(); - void* operator new(size_t sz, nsBoxLayoutState& aState); + void* operator new(size_t sz, nsBoxLayoutState& aState) CPP_THROW_NEW; void operator delete(void* aPtr, size_t sz); }; diff --git a/mozilla/xpcom/ds/nsCRT.h b/mozilla/xpcom/ds/nsCRT.h index 81e0e704f6c..bcd8d6ae497 100644 --- a/mozilla/xpcom/ds/nsCRT.h +++ b/mozilla/xpcom/ds/nsCRT.h @@ -78,7 +78,7 @@ extern const PRUnichar kIsoLatin1ToUCS2[256]; // This macro works with the next macro to declare a non-inlined // version of the above. #define NS_DECL_ZEROING_OPERATOR_NEW \ - void* operator new(size_t sz); \ + void* operator new(size_t sz) CPP_THROW_NEW; \ void operator delete(void* ptr); #define NS_IMPL_ZEROING_OPERATOR_NEW(_class) \