зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1050003
- Remove unnecessary if checks before delete-ing in xpcom/. r=froydnj
This commit is contained in:
Родитель
3e8abfd2e8
Коммит
c70ab152cb
|
@ -466,25 +466,17 @@ Shutdown()
|
|||
|
||||
RecordBatch::DeleteLog();
|
||||
|
||||
if (gMonitor) {
|
||||
delete gMonitor;
|
||||
gMonitor = nullptr;
|
||||
}
|
||||
|
||||
if (gEventFilter) {
|
||||
delete gEventFilter;
|
||||
gEventFilter = nullptr;
|
||||
}
|
||||
|
||||
if (gProfilerStart) {
|
||||
delete gProfilerStart;
|
||||
gProfilerStart = nullptr;
|
||||
}
|
||||
|
||||
if (gMaxBacklogTime) {
|
||||
delete gMaxBacklogTime;
|
||||
gMaxBacklogTime = nullptr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -974,31 +974,27 @@ ShutdownXPCOM(nsIServiceManager* servMgr)
|
|||
|
||||
NS_IF_RELEASE(gDebug);
|
||||
|
||||
if (sIOThread) {
|
||||
delete sIOThread;
|
||||
sIOThread = nullptr;
|
||||
}
|
||||
if (sMessageLoop) {
|
||||
|
||||
delete sMessageLoop;
|
||||
sMessageLoop = nullptr;
|
||||
}
|
||||
|
||||
if (sCommandLineWasInitialized) {
|
||||
CommandLine::Terminate();
|
||||
sCommandLineWasInitialized = false;
|
||||
}
|
||||
if (sExitManager) {
|
||||
|
||||
delete sExitManager;
|
||||
sExitManager = nullptr;
|
||||
}
|
||||
|
||||
Omnijar::CleanUp();
|
||||
|
||||
HangMonitor::Shutdown();
|
||||
|
||||
if (sMainHangMonitor) {
|
||||
delete sMainHangMonitor;
|
||||
sMainHangMonitor = nullptr;
|
||||
}
|
||||
|
||||
BackgroundHangMonitor::Shutdown();
|
||||
|
||||
#ifdef MOZ_VISUAL_EVENT_TRACER
|
||||
|
|
|
@ -83,9 +83,7 @@ protected:
|
|||
|
||||
virtual ~BaseStringEnumerator()
|
||||
{
|
||||
if (mArray) {
|
||||
delete[] mArray;
|
||||
}
|
||||
delete [] mArray;
|
||||
}
|
||||
|
||||
void Sort();
|
||||
|
|
|
@ -400,10 +400,8 @@ nsNativeCharsetConverter::GlobalInit()
|
|||
void
|
||||
nsNativeCharsetConverter::GlobalShutdown()
|
||||
{
|
||||
if (gLock) {
|
||||
delete gLock;
|
||||
gLock = nullptr;
|
||||
}
|
||||
|
||||
if (gNativeToUnicode != INVALID_ICONV_T) {
|
||||
iconv_close(gNativeToUnicode);
|
||||
|
|
|
@ -122,11 +122,9 @@ public:
|
|||
}
|
||||
|
||||
~AutoCreateAndDestroyReentrantMonitor() {
|
||||
if (*mReentrantMonitorPtr) {
|
||||
delete *mReentrantMonitorPtr;
|
||||
*mReentrantMonitorPtr = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ReentrantMonitor** mReentrantMonitorPtr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче