mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Remove base conditional code for crash reporter and injector.
This commit is contained in:
parent
87fa26d31e
commit
434f3590e3
131 changed files with 39 additions and 4139 deletions
|
|
@ -6,9 +6,6 @@
|
|||
#include "GTestRunner.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsICrashReporter.h"
|
||||
#endif
|
||||
#include "testing/TestHarness.h"
|
||||
#include "prenv.h"
|
||||
#ifdef XP_WIN
|
||||
|
|
@ -92,28 +89,6 @@ int RunGTestFunc()
|
|||
#ifdef XP_WIN
|
||||
mozilla::ipc::windows::InitUIThread();
|
||||
#endif
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsCOMPtr<nsICrashReporter> crashreporter;
|
||||
char *crashreporterStr = PR_GetEnv("MOZ_CRASHREPORTER");
|
||||
if (crashreporterStr && !strcmp(crashreporterStr, "1")) {
|
||||
//TODO: move this to an even-more-common location to use in all
|
||||
// C++ unittests
|
||||
crashreporter = do_GetService("@mozilla.org/toolkit/crash-reporter;1");
|
||||
if (crashreporter) {
|
||||
std::cerr << "Setting up crash reporting" << std::endl;
|
||||
|
||||
nsCOMPtr<nsIProperties> dirsvc =
|
||||
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID);
|
||||
nsCOMPtr<nsIFile> cwd;
|
||||
nsresult rv = dirsvc->Get(NS_OS_CURRENT_WORKING_DIR,
|
||||
NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(cwd));
|
||||
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
|
||||
crashreporter->SetEnabled(true);
|
||||
crashreporter->SetMinidumpPath(cwd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue