Bug 632611. Record failures in crash reports. r=ehsan,a=me
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 09 Feb 2011 10:32:24 -0500
changeset 62253 f03a3f52ea03efd4000f2f54cbb14bc4f03e9196
parent 62252 d4ebf3b5162f753e3bb7fd0a81e0406dcb8ad83b
child 62254 91635b0b00e140d215fee43e94c382498cd5a911
push idunknown
push userunknown
push dateunknown
reviewersehsan, me
bugs632611
milestone2.0b12pre
Bug 632611. Record failures in crash reports. r=ehsan,a=me
widget/src/xpwidgets/GfxInfoBase.cpp
--- a/widget/src/xpwidgets/GfxInfoBase.cpp
+++ b/widget/src/xpwidgets/GfxInfoBase.cpp
@@ -670,17 +670,23 @@ GfxInfoBase::EvaluateDownloadedBlacklist
 }
 
 NS_IMETHODIMP_(void)
 GfxInfoBase::LogFailure(const nsACString &failure)
 {
   /* We only keep the first 9 failures */
   if (mFailureCount < NS_ARRAY_LENGTH(mFailures)) {
     mFailures[mFailureCount++] = failure;
+
+    /* record it in the crash notes too */
+#if defined(MOZ_CRASHREPORTER) && defined(MOZ_ENABLE_LIBXUL)
+    CrashReporter::AppendAppNotesToCrashReport(failure);
+#endif
   }
+
 }
 
 /* void getFailures ([optional] out unsigned long failureCount, [array, size_is (failureCount), retval] out string failures); */
 /* XPConnect method of returning arrays is very ugly. Would not recommend. Fallable nsMemory::Alloc makes things worse */
 NS_IMETHODIMP GfxInfoBase::GetFailures(PRUint32 *failureCount NS_OUTPARAM, char ***failures NS_OUTPARAM)
 {
 
   NS_ENSURE_ARG_POINTER(failureCount);