Bug 798132 - Builds without the crash reporter don't start anymore. [r=hub]
authorFabrice Desré <fabrice@mozilla.com>
Thu, 04 Oct 2012 21:10:45 -0700
changeset 109320 0c4293450fe00eb9cd53b4a3be12433f555cc38a
parent 109319 9577adee54a3e95b4d2a3443067cb9076fa9720f
child 109321 a31ce2d6d28e8d01288cdd91bc522d6d6ee9b39d
push id15968
push userfdesre@mozilla.com
push dateFri, 05 Oct 2012 04:10:51 +0000
treeherdermozilla-inbound@0c4293450fe0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershub
bugs798132
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 798132 - Builds without the crash reporter don't start anymore. [r=hub]
b2g/chrome/content/shell.js
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -119,46 +119,48 @@ var shell = {
   get manifestURL() {
     return Services.prefs.getCharPref('browser.manifestURL');
    },
 
   start: function shell_start() {
 
     let cr = Cc["@mozilla.org/xre/app-info;1"]
                .getService(Ci.nsICrashReporter);
-    // Dogfood id. We might want to remove it in the future.
-    // see bug 789466
     try {
-      let dogfoodId = Services.prefs.getCharPref('prerelease.dogfood.id');
-      if (dogfoodId != "") {
-        cr.annotateCrashReport("Email", dogfoodId);
+      // Dogfood id. We might want to remove it in the future.
+      // see bug 789466
+      try {
+        let dogfoodId = Services.prefs.getCharPref('prerelease.dogfood.id');
+        if (dogfoodId != "") {
+          cr.annotateCrashReport("Email", dogfoodId);
+        }
       }
-    }
-    catch (e) { }
+      catch (e) { }
 
 #ifdef MOZ_WIDGET_GONK
-    // Annotate crash report
-    let annotations = [ [ "Android_Hardware",     "ro.hardware" ],
-                        [ "Android_Device",       "ro.product.device" ],
-                        [ "Android_CPU_ABI2",     "ro.product.cpu.abi2" ],
-                        [ "Android_CPU_ABI",      "ro.product.cpu.abi" ],
-                        [ "Android_Manufacturer", "ro.product.manufacturer" ],
-                        [ "Android_Brand",        "ro.product.brand" ],
-                        [ "Android_Model",        "ro.product.model" ],
-                        [ "Android_Board",        "ro.product.board" ],
-      ];
+      // Annotate crash report
+      let annotations = [ [ "Android_Hardware",     "ro.hardware" ],
+                          [ "Android_Device",       "ro.product.device" ],
+                          [ "Android_CPU_ABI2",     "ro.product.cpu.abi2" ],
+                          [ "Android_CPU_ABI",      "ro.product.cpu.abi" ],
+                          [ "Android_Manufacturer", "ro.product.manufacturer" ],
+                          [ "Android_Brand",        "ro.product.brand" ],
+                          [ "Android_Model",        "ro.product.model" ],
+                          [ "Android_Board",        "ro.product.board" ],
+        ];
 
-    annotations.forEach(function (element) {
-        cr.annotateCrashReport(element[0], libcutils.property_get(element[1]));
-      });
+      annotations.forEach(function (element) {
+          cr.annotateCrashReport(element[0], libcutils.property_get(element[1]));
+        });
 
-    let androidVersion = libcutils.property_get("ro.build.version.sdk") +
-                         "(" + libcutils.property_get("ro.build.version.codename") + ")";
-    cr.annotateCrashReport("Android_Version", androidVersion);
+      let androidVersion = libcutils.property_get("ro.build.version.sdk") +
+                           "(" + libcutils.property_get("ro.build.version.codename") + ")";
+      cr.annotateCrashReport("Android_Version", androidVersion);
 #endif
+    } catch(e) { }
 
     let homeURL = this.homeURL;
     if (!homeURL) {
       let msg = 'Fatal error during startup: No homescreen found: try setting B2G_HOMESCREEN';
       alert(msg);
       return;
     }