Bug 1310596 - do not allow errors in reporting migrator data recency to break the rest of the migration, r=mikedeboer, a=ritu
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 18 Oct 2016 11:54:22 +0100
changeset 358422 971ad43a07cc5cde085ab41eb4da83684087495f
parent 358421 906d5b58dd0ef81deb30722898236427c928007b
child 358423 2e6f5f52a085d9f93b93e20aa0a2a2d2cf142d37
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, ritu
bugs1310596
milestone51.0a2
Bug 1310596 - do not allow errors in reporting migrator data recency to break the rest of the migration, r=mikedeboer, a=ritu MozReview-Commit-ID: eWr0abwU7p
browser/components/migration/content/migration.js
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -420,17 +420,22 @@ var MigrationWizard = {
       break;
     case "Migration:ItemAfterMigrate":
       label = document.getElementById(aData + "_migrated");
       if (label)
         label.removeAttribute("style");
       break;
     case "Migration:Ended":
       if (this.isInitialMigration) {
-        this.reportDataRecencyTelemetry();
+        // Ensure errors in reporting data recency do not affect the rest of the migration.
+        try {
+          this.reportDataRecencyTelemetry();
+        } catch (ex) {
+          Cu.reportError(ex);
+        }
       }
       if (this._autoMigrate) {
         let hasImportedHomepage = !!(this._newHomePage && this._newHomePage != "DEFAULT");
         Services.telemetry.getKeyedHistogramById("FX_MIGRATION_IMPORTED_HOMEPAGE")
                           .add(this._source, hasImportedHomepage);
         if (this._newHomePage) {
           try {
             // set homepage properly