Bug 1533426 - browser/components/preferences/in-content/tests/siteData/browser_siteData2.js fails with LSNG enabled; r=johannh
authorJan Varga <jan.varga@gmail.com>
Thu, 07 Mar 2019 22:06:39 +0100
changeset 520877 9dde4b9b46e23680556871b3fdca837bb375b809
parent 520876 b2f184631538e67dcd7bca6eb82510abd6d8974b
child 520878 25b446bf18bc5c2e504f29f71c9caa94d3e90380
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1533426
milestone67.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 1533426 - browser/components/preferences/in-content/tests/siteData/browser_siteData2.js fails with LSNG enabled; r=johannh
browser/components/preferences/siteDataSettings.js
--- a/browser/components/preferences/siteDataSettings.js
+++ b/browser/components/preferences/siteDataSettings.js
@@ -216,34 +216,42 @@ let gSiteDataSettings = {
       if (siteForHost) {
         siteForHost.userAction = "remove";
       }
       item.remove();
     }
     this._updateButtonsState();
   },
 
-  saveChanges() {
+  async saveChanges() {
     // Tracks whether the user confirmed their decision.
     let allowed = false;
 
     let removals = this._sites
       .filter(site => site.userAction == "remove")
       .map(site => site.host);
 
     if (removals.length > 0) {
       if (this._sites.length == removals.length) {
         allowed = SiteDataManager.promptSiteDataRemoval(window);
         if (allowed) {
-          SiteDataManager.removeAll();
+          try {
+            await SiteDataManager.removeAll();
+          } catch (e) {
+            Cu.reportError(e);
+          }
         }
       } else {
         allowed = SiteDataManager.promptSiteDataRemoval(window, removals);
         if (allowed) {
-          SiteDataManager.remove(removals).catch(Cu.reportError);
+          try {
+            await SiteDataManager.remove(removals);
+          } catch (e) {
+            Cu.reportError(e);
+          }
         }
       }
     }
 
     // If the user cancelled the confirm dialog keep the site data window open,
     // they can still press cancel again to exit.
     if (allowed) {
       this.close();