Remove base conditional code for crash reporter and injector.

This commit is contained in:
wolfbeast 2018-03-30 08:50:58 +02:00 committed by Roy Tam
commit 434f3590e3
131 changed files with 39 additions and 4139 deletions

View file

@ -6,9 +6,6 @@
#include "nsWidgetsCID.h"
#include "nsIComponentRegistrar.h"
#ifdef MOZ_CRASHREPORTER
#include "nsICrashReporter.h"
#endif
#ifndef TEST_NAME
#error "Must #define TEST_NAME before including places_test_harness_tail.h"
@ -94,32 +91,6 @@ main(int aArgc,
return -1;
}
#ifdef MOZ_CRASHREPORTER
char* enabled = PR_GetEnv("MOZ_CRASHREPORTER");
if (enabled && !strcmp(enabled, "1")) {
// bug 787458: move this to an even-more-common location to use in all
// C++ unittests
nsCOMPtr<nsICrashReporter> crashreporter =
do_GetService("@mozilla.org/toolkit/crash-reporter;1");
if (crashreporter) {
fprintf(stderr, "Setting up crash reporting\n");
nsCOMPtr<nsIProperties> dirsvc =
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID);
if (!dirsvc)
NS_RUNTIMEABORT("Couldn't get directory service");
nsCOMPtr<nsIFile> cwd;
nsresult rv = dirsvc->Get(NS_OS_CURRENT_WORKING_DIR,
NS_GET_IID(nsIFile),
getter_AddRefs(cwd));
if (NS_FAILED(rv))
NS_RUNTIMEABORT("Couldn't get CWD");
crashreporter->SetEnabled(true);
crashreporter->SetMinidumpPath(cwd);
}
}
#endif
RefPtr<WaitForConnectionClosed> spinClose = new WaitForConnectionClosed();
// Tinderboxes are constantly on idle. Since idle tasks can interact with