Backed out changeset d4b46f6800f8 (bug 1027497) for B2G Windows build bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 24 Jun 2014 18:34:44 -0700
changeset 190611 a6d4659e10318523f43e6eb5beac93141e81d109
parent 190610 59b0072d64aa5bebe2906b1778727d8172ac0f84
child 190612 89cb4420380d917d728d10833627f71b9896222f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1027497
milestone33.0a1
backs outd4b46f6800f8f8cd59fd7c8dff4179e0bf7524ec
Backed out changeset d4b46f6800f8 (bug 1027497) for B2G Windows build bustage on a CLOSED TREE
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3210,16 +3210,29 @@ XREMain::XRE_mainInit(bool* aExitFlag)
       NS_ENSURE_TRUE(chromeReg, 1);
 
       chromeReg->CheckForNewChrome();
     }
     *aExitFlag = true;
     return 0;
   }
 
+  if (PR_GetEnv("MOZ_RUN_GTEST")) {
+    int result;
+    // RunGTest will only be set if we're in xul-unit
+    if (mozilla::RunGTest) {
+      result = mozilla::RunGTest();
+    } else {
+      result = 1;
+      printf("TEST-UNEXPECTED-FAIL | gtest | Not compiled with enable-tests\n");
+    }
+    *aExitFlag = true;
+    return result;
+  }
+
   return 0;
 }
 
 #ifdef MOZ_CRASHREPORTER
 #ifdef XP_WIN
 /**
  * Uses WMI to read some manufacturer information that may be useful for
  * diagnosing hardware-specific crashes. This function is best-effort; failures
@@ -3414,44 +3427,29 @@ XREMain::XRE_mainStartup(bool* aExitFlag
 
   // Initialize GTK here for splash.
 
   // Open the display ourselves instead of using gtk_init, so that we can
   // close it without fear that one day gtk might clean up the display it
   // opens.
   if (!gtk_parse_args(&gArgc, &gArgv))
     return 1;
-#endif /* MOZ_WIDGET_GTK */
-
-  if (PR_GetEnv("MOZ_RUN_GTEST")) {
-    int result;
-    // RunGTest will only be set if we're in xul-unit
-    if (mozilla::RunGTest) {
-      result = mozilla::RunGTest();
-    } else {
-      result = 1;
-      printf("TEST-UNEXPECTED-FAIL | gtest | Not compiled with enable-tests\n");
-    }
-    *aExitFlag = true;
-    return result;
-  }
-
-#if defined(MOZ_WIDGET_GTK)
+
   // display_name is owned by gdk.
   const char *display_name = gdk_get_display_arg_name();
   if (display_name) {
     SaveWordToEnv("DISPLAY", nsDependentCString(display_name));
   } else {
     display_name = PR_GetEnv("DISPLAY");
     if (!display_name) {
       PR_fprintf(PR_STDERR, "Error: no display specified\n");
       return 1;
     }
   }
-#endif /* MOZ_WIDGET_GTK */
+#endif /* MOZ_WIDGET_GTK2 */
 
 #ifdef MOZ_ENABLE_XREMOTE
   // handle -remote now that xpcom is fired up
   bool newInstance;
   {
     char *e = PR_GetEnv("MOZ_NO_REMOTE");
     mDisableRemote = (e && *e);
     if (mDisableRemote) {