This commit is contained in:
kipp%netscape.com 1999-02-26 20:02:06 +00:00
Родитель 628c8f6245
Коммит 4a28dcfe2b
27 изменённых файлов: 39 добавлений и 257 удалений

Просмотреть файл

@ -691,17 +691,7 @@ public:
nsIPresContext* aPresContext); nsIPresContext* aPresContext);
virtual ~StyleContextImpl(); virtual ~StyleContextImpl();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = ::operator new(size);
if (rv) {
nsCRT::zero(rv, size);
}
return rv;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -139,21 +139,11 @@ class SinkContext;
class HTMLContentSink : public nsIHTMLContentSink { class HTMLContentSink : public nsIHTMLContentSink {
public: public:
void* operator new(size_t size) {
void* rv = ::operator new(size);
if (rv) {
nsCRT::zero(rv, size);
}
return rv;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
HTMLContentSink(); HTMLContentSink();
virtual ~HTMLContentSink(); virtual ~HTMLContentSink();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
nsresult Init(nsIDocument* aDoc, nsresult Init(nsIDocument* aDoc,
nsIURL* aURL, nsIURL* aURL,
nsIWebShell* aContainer); nsIWebShell* aContainer);

Просмотреть файл

@ -618,13 +618,11 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const
class CSSDeclarationImpl : public nsICSSDeclaration { class CSSDeclarationImpl : public nsICSSDeclaration {
public: public:
void* operator new(size_t size);
void operator delete(void* ptr);
CSSDeclarationImpl(void); CSSDeclarationImpl(void);
virtual ~CSSDeclarationImpl(void); virtual ~CSSDeclarationImpl(void);
NS_DECL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData); NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData);
@ -685,19 +683,7 @@ static PRInt32 gInstanceCount;
#endif #endif
void* CSSDeclarationImpl::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(CSSDeclarationImpl)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void CSSDeclarationImpl::operator delete(void* ptr)
{
::operator delete(ptr);
}
CSSDeclarationImpl::CSSDeclarationImpl(void) CSSDeclarationImpl::CSSDeclarationImpl(void)
{ {

Просмотреть файл

@ -618,13 +618,11 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const
class CSSDeclarationImpl : public nsICSSDeclaration { class CSSDeclarationImpl : public nsICSSDeclaration {
public: public:
void* operator new(size_t size);
void operator delete(void* ptr);
CSSDeclarationImpl(void); CSSDeclarationImpl(void);
virtual ~CSSDeclarationImpl(void); virtual ~CSSDeclarationImpl(void);
NS_DECL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData); NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData);
@ -685,19 +683,7 @@ static PRInt32 gInstanceCount;
#endif #endif
void* CSSDeclarationImpl::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(CSSDeclarationImpl)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void CSSDeclarationImpl::operator delete(void* ptr)
{
::operator delete(ptr);
}
CSSDeclarationImpl::CSSDeclarationImpl(void) CSSDeclarationImpl::CSSDeclarationImpl(void)
{ {

Просмотреть файл

@ -130,11 +130,7 @@ public:
nsWebShell(); nsWebShell();
virtual ~nsWebShell(); virtual ~nsWebShell();
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -138,11 +138,7 @@ public:
PageGrabber(); PageGrabber();
~PageGrabber(); ~PageGrabber();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = ::operator new(size);
nsCRT::zero(rv, size);
return (void*) rv;
}
nsresult Init(const nsString& aDirectory); nsresult Init(const nsString& aDirectory);

Просмотреть файл

@ -190,17 +190,7 @@ class PresShell : public nsIPresShell, public nsIViewObserver,
public: public:
PresShell(); PresShell();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -28,17 +28,7 @@ class nsIImageGroup;
// Base class for concrete presentation context classes // Base class for concrete presentation context classes
class nsPresContext : public nsIPresContext { class nsPresContext : public nsIPresContext {
public: public:
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = ::operator new(size);
if (rv) {
nsCRT::zero(rv, size);
}
return rv;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
// nsISupports methods // nsISupports methods
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -691,17 +691,7 @@ public:
nsIPresContext* aPresContext); nsIPresContext* aPresContext);
virtual ~StyleContextImpl(); virtual ~StyleContextImpl();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = ::operator new(size);
if (rv) {
nsCRT::zero(rv, size);
}
return rv;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -159,19 +159,7 @@ NS_NewEmptyFrame(nsIFrame** aInstancePtrResult)
return NS_OK; return NS_OK;
} }
void* nsFrame::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(nsFrame)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void nsFrame::operator delete(void* ptr)
{
::operator delete(ptr);
}
nsFrame::nsFrame() nsFrame::nsFrame()
{ {

Просмотреть файл

@ -104,9 +104,7 @@ public:
friend nsresult NS_NewEmptyFrame(nsIFrame** aInstancePtrResult); friend nsresult NS_NewEmptyFrame(nsIFrame** aInstancePtrResult);
// Overloaded new operator. Initializes the memory to 0 // Overloaded new operator. Initializes the memory to 0
void* operator new(size_t size); NS_DECL_ZEROING_OPERATOR_NEW
void operator delete(void* ptr);
// nsISupports // nsISupports
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);

Просмотреть файл

@ -159,19 +159,7 @@ NS_NewEmptyFrame(nsIFrame** aInstancePtrResult)
return NS_OK; return NS_OK;
} }
void* nsFrame::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(nsFrame)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void nsFrame::operator delete(void* ptr)
{
::operator delete(ptr);
}
nsFrame::nsFrame() nsFrame::nsFrame()
{ {

Просмотреть файл

@ -104,9 +104,7 @@ public:
friend nsresult NS_NewEmptyFrame(nsIFrame** aInstancePtrResult); friend nsresult NS_NewEmptyFrame(nsIFrame** aInstancePtrResult);
// Overloaded new operator. Initializes the memory to 0 // Overloaded new operator. Initializes the memory to 0
void* operator new(size_t size); NS_DECL_ZEROING_OPERATOR_NEW
void operator delete(void* ptr);
// nsISupports // nsISupports
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);

Просмотреть файл

@ -190,17 +190,7 @@ class PresShell : public nsIPresShell, public nsIViewObserver,
public: public:
PresShell(); PresShell();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -139,21 +139,11 @@ class SinkContext;
class HTMLContentSink : public nsIHTMLContentSink { class HTMLContentSink : public nsIHTMLContentSink {
public: public:
void* operator new(size_t size) {
void* rv = ::operator new(size);
if (rv) {
nsCRT::zero(rv, size);
}
return rv;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
HTMLContentSink(); HTMLContentSink();
virtual ~HTMLContentSink(); virtual ~HTMLContentSink();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
nsresult Init(nsIDocument* aDoc, nsresult Init(nsIDocument* aDoc,
nsIURL* aURL, nsIURL* aURL,
nsIWebShell* aContainer); nsIWebShell* aContainer);

Просмотреть файл

@ -618,13 +618,11 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const
class CSSDeclarationImpl : public nsICSSDeclaration { class CSSDeclarationImpl : public nsICSSDeclaration {
public: public:
void* operator new(size_t size);
void operator delete(void* ptr);
CSSDeclarationImpl(void); CSSDeclarationImpl(void);
virtual ~CSSDeclarationImpl(void); virtual ~CSSDeclarationImpl(void);
NS_DECL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData); NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData);
@ -685,19 +683,7 @@ static PRInt32 gInstanceCount;
#endif #endif
void* CSSDeclarationImpl::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(CSSDeclarationImpl)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void CSSDeclarationImpl::operator delete(void* ptr)
{
::operator delete(ptr);
}
CSSDeclarationImpl::CSSDeclarationImpl(void) CSSDeclarationImpl::CSSDeclarationImpl(void)
{ {

Просмотреть файл

@ -618,13 +618,11 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const
class CSSDeclarationImpl : public nsICSSDeclaration { class CSSDeclarationImpl : public nsICSSDeclaration {
public: public:
void* operator new(size_t size);
void operator delete(void* ptr);
CSSDeclarationImpl(void); CSSDeclarationImpl(void);
virtual ~CSSDeclarationImpl(void); virtual ~CSSDeclarationImpl(void);
NS_DECL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData); NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData);
@ -685,19 +683,7 @@ static PRInt32 gInstanceCount;
#endif #endif
void* CSSDeclarationImpl::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(CSSDeclarationImpl)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void CSSDeclarationImpl::operator delete(void* ptr)
{
::operator delete(ptr);
}
CSSDeclarationImpl::CSSDeclarationImpl(void) CSSDeclarationImpl::CSSDeclarationImpl(void)
{ {

Просмотреть файл

@ -618,13 +618,11 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const
class CSSDeclarationImpl : public nsICSSDeclaration { class CSSDeclarationImpl : public nsICSSDeclaration {
public: public:
void* operator new(size_t size);
void operator delete(void* ptr);
CSSDeclarationImpl(void); CSSDeclarationImpl(void);
virtual ~CSSDeclarationImpl(void); virtual ~CSSDeclarationImpl(void);
NS_DECL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData); NS_IMETHOD GetData(const nsID& aSID, nsCSSStruct** aData);
@ -685,19 +683,7 @@ static PRInt32 gInstanceCount;
#endif #endif
void* CSSDeclarationImpl::operator new(size_t size) NS_IMPL_ZEROING_OPERATOR_NEW(CSSDeclarationImpl)
{
void* result = ::operator new(size);
if (result) {
nsCRT::zero(result, size);
}
return result;
}
void CSSDeclarationImpl::operator delete(void* ptr)
{
::operator delete(ptr);
}
CSSDeclarationImpl::CSSDeclarationImpl(void) CSSDeclarationImpl::CSSDeclarationImpl(void)
{ {

Просмотреть файл

@ -691,17 +691,7 @@ public:
nsIPresContext* aPresContext); nsIPresContext* aPresContext);
virtual ~StyleContextImpl(); virtual ~StyleContextImpl();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = ::operator new(size);
if (rv) {
nsCRT::zero(rv, size);
}
return rv;
}
void operator delete(void* ptr) {
::operator delete(ptr);
}
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -138,11 +138,7 @@ public:
PageGrabber(); PageGrabber();
~PageGrabber(); ~PageGrabber();
void* operator new(size_t size) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = ::operator new(size);
nsCRT::zero(rv, size);
return (void*) rv;
}
nsresult Init(const nsString& aDirectory); nsresult Init(const nsString& aDirectory);

Просмотреть файл

@ -62,11 +62,7 @@ public:
DocumentViewerImpl(); DocumentViewerImpl();
DocumentViewerImpl(nsIPresContext* aPresContext); DocumentViewerImpl(nsIPresContext* aPresContext);
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
// nsISupports interface... // nsISupports interface...
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -109,11 +109,7 @@ class PluginViewerImpl : public nsIContentViewer
public: public:
PluginViewerImpl(const char* aCommand, nsIStreamListener** aDocListener); PluginViewerImpl(const char* aCommand, nsIStreamListener** aDocListener);
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -58,11 +58,7 @@ class nsThrobber : public nsIThrobber,
public: public:
nsThrobber(nsISupports* aOuter); nsThrobber(nsISupports* aOuter);
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -130,11 +130,7 @@ public:
nsWebShell(); nsWebShell();
virtual ~nsWebShell(); virtual ~nsWebShell();
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -60,11 +60,7 @@ class nsBrowserWindow : public nsIBrowserWindow,
public nsIWebShellContainer public nsIWebShellContainer
{ {
public: public:
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
// nsISupports // nsISupports
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

Просмотреть файл

@ -33,11 +33,7 @@ class nsIBrowserWindow;
class nsViewerApp : public nsISupports, public nsDispatchListener class nsViewerApp : public nsISupports, public nsDispatchListener
{ {
public: public:
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
virtual ~nsViewerApp(); virtual ~nsViewerApp();

Просмотреть файл

@ -48,11 +48,7 @@ class nsXPBaseWindow : public nsIXPBaseWindow,
public nsIDOMMouseListener public nsIDOMMouseListener
{ {
public: public:
void* operator new(size_t sz) { NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void* rv = new char[sz];
nsCRT::zero(rv, sz);
return rv;
}
nsXPBaseWindow(); nsXPBaseWindow();
virtual ~nsXPBaseWindow(); virtual ~nsXPBaseWindow();