From 4e368f8199a61c6319621ad1b9d6c352f0319f41 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 30 Mar 2018 08:50:58 +0200 Subject: Remove base conditional code for crash reporter and injector. --- xpcom/tests/gtest/TestDeadlockDetector.cpp | 14 +------------- xpcom/tests/gtest/TestPLDHash.cpp | 15 --------------- xpcom/tests/gtest/TestSTLWrappers.cpp | 14 -------------- 3 files changed, 1 insertion(+), 42 deletions(-) (limited to 'xpcom/tests/gtest') diff --git a/xpcom/tests/gtest/TestDeadlockDetector.cpp b/xpcom/tests/gtest/TestDeadlockDetector.cpp index 646ee3e1d..877c5f5c3 100644 --- a/xpcom/tests/gtest/TestDeadlockDetector.cpp +++ b/xpcom/tests/gtest/TestDeadlockDetector.cpp @@ -15,12 +15,6 @@ #include "mozilla/ReentrantMonitor.h" #include "mozilla/Mutex.h" -#ifdef MOZ_CRASHREPORTER -#include "nsCOMPtr.h" -#include "nsICrashReporter.h" -#include "nsServiceManagerUtils.h" -#endif - #include "gtest/gtest.h" using namespace mozilla; @@ -62,13 +56,7 @@ private: void DisableCrashReporter() { -#ifdef MOZ_CRASHREPORTER - nsCOMPtr crashreporter = - do_GetService("@mozilla.org/toolkit/crash-reporter;1"); - if (crashreporter) { - crashreporter->SetEnabled(false); - } -#endif + /*** STUB ***/ } //----------------------------------------------------------------------------- diff --git a/xpcom/tests/gtest/TestPLDHash.cpp b/xpcom/tests/gtest/TestPLDHash.cpp index e7a73ae1b..4405b102c 100644 --- a/xpcom/tests/gtest/TestPLDHash.cpp +++ b/xpcom/tests/gtest/TestPLDHash.cpp @@ -21,10 +21,6 @@ extern unsigned int _gdb_sleep_duration; #endif -#ifdef MOZ_CRASHREPORTER -#include "nsICrashReporter.h" -#endif - // We can test that certain operations cause expected aborts by forking // and then checking that the child aborted in the expected way (i.e. via // MOZ_CRASH). We skip this for the following configurations. @@ -46,17 +42,6 @@ TestCrashyOperation(void (*aCrashyOperation)()) ASSERT_NE(pid, -1); if (pid == 0) { - // Disable the crashreporter -- writing a crash dump in the child will - // prevent the parent from writing a subsequent dump. Crashes here are - // expected, so we don't want their stacks to show up in the log anyway. -#ifdef MOZ_CRASHREPORTER - nsCOMPtr crashreporter = - do_GetService("@mozilla.org/toolkit/crash-reporter;1"); - if (crashreporter) { - crashreporter->SetEnabled(false); - } -#endif - // Child: perform the crashy operation. fprintf(stderr, "TestCrashyOperation: The following crash is expected. Do not panic.\n"); aCrashyOperation(); diff --git a/xpcom/tests/gtest/TestSTLWrappers.cpp b/xpcom/tests/gtest/TestSTLWrappers.cpp index 9559548a3..295aa7434 100644 --- a/xpcom/tests/gtest/TestSTLWrappers.cpp +++ b/xpcom/tests/gtest/TestSTLWrappers.cpp @@ -10,12 +10,6 @@ # error "failed to wrap " #endif -#ifdef MOZ_CRASHREPORTER -#include "nsCOMPtr.h" -#include "nsICrashReporter.h" -#include "nsServiceManagerUtils.h" -#endif - // gcc errors out if we |try ... catch| with -fno-exceptions, but we // can still test on windows #ifdef _MSC_VER @@ -40,14 +34,6 @@ void ShouldAbort() _gdb_sleep_duration = 0; #endif -#ifdef MOZ_CRASHREPORTER - nsCOMPtr crashreporter = - do_GetService("@mozilla.org/toolkit/crash-reporter;1"); - if (crashreporter) { - crashreporter->SetEnabled(false); - } -#endif - std::vector v; int rv = 1; -- cgit v1.2.3