Bug 1402519 - Remove MOZ_CRASHREPORTER directives from modules/libpref; r?njn
MozReview-Commit-ID: 3Jr4Cfe9Bn1
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -40,16 +40,17 @@
#include "nsClassHashtable.h"
#include "nsCOMArray.h"
#include "nsCOMPtr.h"
#include "nsCRT.h"
#include "nsDataHashtable.h"
#include "nsDirectoryServiceDefs.h"
#include "nsICategoryManager.h"
#include "nsIConsoleService.h"
+#include "nsICrashReporter.h"
#include "nsIDirectoryService.h"
#include "nsIFile.h"
#include "nsIInputStream.h"
#include "nsIMemoryReporter.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsIOutputStream.h"
#include "nsIPrefBranch.h"
@@ -76,20 +77,16 @@
#include "nsXPCOM.h"
#include "nsXULAppAPI.h"
#include "nsZipArchive.h"
#include "plbase64.h"
#include "PLDHashTable.h"
#include "plstr.h"
#include "prlink.h"
-#ifdef MOZ_CRASHREPORTER
-#include "nsICrashReporter.h"
-#endif
-
#ifdef XP_WIN
#include "windows.h"
#endif
using namespace mozilla;
#ifdef DEBUG
@@ -2610,26 +2607,25 @@ nsPrefBranch::GetComplexValue(const char
nsCOMPtr<nsISupportsString> theString(
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) {
// Debugging to see why we end up with very long strings here with
// some addons, see bug 836263.
nsAutoString wdata;
if (!AppendUTF8toUTF16(utf8String, wdata, mozilla::fallible)) {
-#ifdef MOZ_CRASHREPORTER
nsCOMPtr<nsICrashReporter> cr =
do_GetService("@mozilla.org/toolkit/crash-reporter;1");
if (cr) {
cr->AnnotateCrashReport(NS_LITERAL_CSTRING("bug836263-size"),
nsPrintfCString("%x", utf8String.Length()));
cr->RegisterAppMemory(uint64_t(utf8String.BeginReading()),
std::min(0x1000U, utf8String.Length()));
}
-#endif
+
MOZ_CRASH("bug836263");
}
theString->SetData(wdata);
theString.forget(reinterpret_cast<nsISupportsString**>(aRetVal));
}
return rv;
}