Bug 924307 - Intermittent "reporter is null at abouthealth.js:27"; r=rnewman
authorGregory Szorc <gps@mozilla.com>
Wed, 20 Nov 2013 11:41:08 -0800
changeset 156602 1db4516a89b1e0f4d6a03b31aa38ca02b7e519d2
parent 156601 1e0009c38c5001a8abc2be368a6f2788886db260
child 156603 ea7e3169f3ff748f7265682bfa61d597e8061798
push id36476
push usergszorc@mozilla.com
push dateWed, 20 Nov 2013 20:31:10 +0000
treeherdermozilla-inbound@1db4516a89b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs924307
milestone28.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 924307 - Intermittent "reporter is null at abouthealth.js:27"; r=rnewman The error message comes from abouthealth.js not checking if a variable is null before access. That bug is fixed. However, the underlying issue of "the reporter is null" still remains. Logging has been added to hopefully catch issues. The signature of the failure will change.
browser/base/content/abouthealthreport/abouthealth.js
browser/base/content/test/general/browser.ini
services/datareporting/DataReportingService.js
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -19,16 +19,21 @@ const policy = Cc["@mozilla.org/datarepo
                  .wrappedJSObject
                  .policy;
 
 const prefs = new Preferences("datareporting.healthreport.");
 
 
 let healthReportWrapper = {
   init: function () {
+    if (!reporter) {
+      healthReportWrapper.handleInitFailure();
+      return;
+    }
+
     reporter.onInit().then(healthReportWrapper.refreshPayload,
                            healthReportWrapper.handleInitFailure);
 
     let iframe = document.getElementById("remote-report");
     iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
     let report = this._getReportURI();
     iframe.src = report.spec;
     prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper);
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -103,17 +103,16 @@ skip-if = toolkit == "gtk2" || toolkit =
 [browser_CTP_crashreporting.js]
 run-if = crashreporter
 [browser_CTP_data_urls.js]
 [browser_CTP_drag_drop.js]
 [browser_CTP_nonplugins.js]
 [browser_CTP_resize.js]
 [browser_URLBarSetURI.js]
 [browser_aboutHealthReport.js]
-skip-if = os == "linux" # Bug 924307
 [browser_aboutHome.js]
 [browser_aboutSyncProgress.js]
 [browser_addKeywordSearch.js]
 [browser_alltabslistener.js]
 [browser_blob-channelname.js]
 [browser_bookmark_titles.js]
 skip-if = toolkit == "windows" # Disabled on Windows due to frequent failures (bugs 825739, 841341)
 [browser_bug304198.js]
--- a/services/datareporting/DataReportingService.js
+++ b/services/datareporting/DataReportingService.js
@@ -207,16 +207,18 @@ DataReportingService.prototype = Object.
     if ("_healthReporter" in this) {
       return this._healthReporter;
     }
 
     try {
       this._loadHealthReporter();
     } catch (ex) {
       this._healthReporter = null;
+      Cu.reportError("Exception when obtaining health reporter: " +
+                     CommonUtils.exceptionStr(ex));
     }
 
     return this._healthReporter;
   },
 
   _loadHealthReporter: function () {
     let ns = {};
     // Lazy import so application startup isn't adversely affected.