зеркало из https://github.com/mozilla/gecko-dev.git
Added TestShutdown to detect memory leaks in xpcom.
This commit is contained in:
Родитель
334c7b3f3e
Коммит
2117385b18
|
@ -0,0 +1,32 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
// Gee this seems simple! It's for testing for memory leaks.
|
||||
|
||||
void main()
|
||||
{
|
||||
nsresult rv;
|
||||
nsIServiceManager* servMgr;
|
||||
rv = NS_InitXPCOM(&servMgr);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_InitXPCOM failed");
|
||||
rv = NS_ShutdownXPCOM(servMgr);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");
|
||||
NS_RELEASE(servMgr);
|
||||
}
|
|
@ -38,6 +38,7 @@ PROG13 = .\$(OBJDIR)\TestThreads.exe
|
|||
PROG14 = .\$(OBJDIR)\TestObserverService.exe
|
||||
PROG15 = .\$(OBJDIR)\TestBuffers.exe
|
||||
PROG16 = .\$(OBJDIR)\TestPipes.exe
|
||||
PROG17 = .\$(OBJDIR)\TestShutdown.exe
|
||||
|
||||
RESFILE = timer.res
|
||||
|
||||
|
@ -54,6 +55,7 @@ PROGRAMS = $(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5) \
|
|||
$(PROG14) \
|
||||
$(PROG15) \
|
||||
$(PROG16) \
|
||||
$(PROG17) \
|
||||
$(NULL)
|
||||
|
||||
LCFLAGS=-DUSE_NSREG -GX
|
||||
|
@ -123,3 +125,5 @@ $(PROG14): $(OBJDIR) TestObserverService.cpp
|
|||
$(PROG15): $(OBJDIR) TestBuffers.cpp
|
||||
|
||||
$(PROG16): $(OBJDIR) TestPipes.cpp
|
||||
|
||||
$(PROG17): $(OBJDIR) TestShutdown.cpp
|
||||
|
|
Загрузка…
Ссылка в новой задаче