Bug 741741 - Enable headless crash reporting for metrofx. r=ted
authorJim Mathies <jmathies@mozilla.com>
Fri, 27 Jul 2012 08:06:38 -0500
changeset 101086 c6b3dbee10d967878c9d7a3ef3502f929d7703b0
parent 101085 8ddfcd0a45a545f3193a2db28866b8e4e418ff7d
child 101087 fa6a84e7ba5384d49144b2b2477f9f34dfe49772
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersted
bugs741741
milestone17.0a1
Bug 741741 - Enable headless crash reporting for metrofx. r=ted
toolkit/crashreporter/nsExceptionHandler.cpp
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -728,16 +728,23 @@ nsresult SetExceptionHandler(nsIFile* aX
 
   const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
   if (envvar && *envvar && !force)
     return NS_OK;
 
 #if defined(MOZ_WIDGET_GONK)
   doReport = false;
   headlessClient = true;
+#elif defined(XP_WIN)
+  if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
+    doReport = ShouldReport();
+  } else {
+    doReport = false;
+    headlessClient = true;
+  }
 #else
   // this environment variable prevents us from launching
   // the crash reporter client
   doReport = ShouldReport();
 #endif
 
   // allocate our strings
   crashReporterAPIData = new nsCString();