зеркало из https://github.com/mozilla/pjs.git
Bug 389779: SeaMonkey startup leaks nsLocalFile due to bug 388833, r+sr=Neil
This commit is contained in:
Родитель
a922cc76df
Коммит
5d88b7a880
|
@ -67,8 +67,20 @@ static void Output(const char *fmt, ... )
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper class which calls NS_LogTerm/NS_LogTerm in it's scope.
|
||||
*/
|
||||
class ScopedLogging
|
||||
{
|
||||
public:
|
||||
ScopedLogging() { NS_LogInit(); }
|
||||
~ScopedLogging() { NS_LogTerm(); }
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
ScopedLogging log;
|
||||
|
||||
nsCOMPtr<nsILocalFile> appini;
|
||||
nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче