зеркало из https://github.com/mozilla/gecko-dev.git
Bug 994707 - Provide the crash events path as an environment variable for the crashreporter. r=ted
--HG-- extra : rebase_source : 1ca29ca44c3fbf18504afe0ce1a6c1d1d87a49a2
This commit is contained in:
Родитель
990d53f089
Коммит
575447ec2c
|
@ -2107,10 +2107,21 @@ SetCrashEventsDir(nsIFile* aDir)
|
||||||
nsString path;
|
nsString path;
|
||||||
eventsDir->GetPath(path);
|
eventsDir->GetPath(path);
|
||||||
eventsDirectory = reinterpret_cast<wchar_t*>(ToNewUnicode(path));
|
eventsDirectory = reinterpret_cast<wchar_t*>(ToNewUnicode(path));
|
||||||
|
|
||||||
|
// Save the path in the environment for the crash reporter application.
|
||||||
|
nsAutoString eventsDirEnv(NS_LITERAL_STRING("MOZ_CRASHREPORTER_EVENTS_DIRECTORY="));
|
||||||
|
eventsDirEnv.Append(path);
|
||||||
|
_wputenv(eventsDirEnv.get());
|
||||||
#else
|
#else
|
||||||
nsCString path;
|
nsCString path;
|
||||||
eventsDir->GetNativePath(path);
|
eventsDir->GetNativePath(path);
|
||||||
eventsDirectory = ToNewCString(path);
|
eventsDirectory = ToNewCString(path);
|
||||||
|
|
||||||
|
// Save the path in the environment for the crash reporter application.
|
||||||
|
nsAutoCString eventsDirEnv("MOZ_CRASHREPORTER_EVENTS_DIRECTORY=");
|
||||||
|
eventsDirEnv.Append(path);
|
||||||
|
char* eventsEnv = ToNewCString(eventsDirEnv);
|
||||||
|
PR_SetEnv(eventsEnv);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче