зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1343866
- Scope more nsCOMPtrs in XRE_XPCShellMain(); r=bsmedberg
This commit is contained in:
Родитель
e69291f9ae
Коммит
65b2fe2b53
|
@ -1323,6 +1323,7 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
|
|||
printf_stderr("*** You are running in chaos test mode. See ChaosMode.h. ***\n");
|
||||
}
|
||||
|
||||
{ // Start scoping nsCOMPtrs
|
||||
nsCOMPtr<nsIFile> appFile;
|
||||
rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appFile));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -1431,7 +1432,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
|
|||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
if (argc > 1 && !strcmp(argv[1], "--greomni")) {
|
||||
nsCOMPtr<nsIFile> greOmni;
|
||||
nsCOMPtr<nsIFile> appOmni;
|
||||
|
@ -1626,6 +1626,11 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
|
|||
JS_GC(cx);
|
||||
}
|
||||
JS_GC(cx);
|
||||
|
||||
dirprovider.ClearGREDirs();
|
||||
dirprovider.ClearAppDir();
|
||||
dirprovider.ClearPluginDir();
|
||||
dirprovider.ClearAppFile();
|
||||
} // this scopes the nsCOMPtrs
|
||||
|
||||
if (!XRE_ShutdownTestShell())
|
||||
|
@ -1643,12 +1648,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
|
|||
#endif
|
||||
|
||||
telStats = nullptr;
|
||||
appDir = nullptr;
|
||||
appFile = nullptr;
|
||||
dirprovider.ClearGREDirs();
|
||||
dirprovider.ClearAppDir();
|
||||
dirprovider.ClearPluginDir();
|
||||
dirprovider.ClearAppFile();
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Shut down the crashreporter service to prevent leaking some strings it holds.
|
||||
|
|
Загрузка…
Ссылка в новой задаче