[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-60.4.0esr-8.5-1] Bug 28507 - Don't call Push and Sync services during Sanitize



commit a3754ec3a532e489207ce12781a4b6fb5a1daa37
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date:   Fri Nov 30 04:51:05 2018 +0000

    Bug 28507 - Don't call Push and Sync services during Sanitize
---
 mobile/android/modules/Sanitizer.jsm | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/mobile/android/modules/Sanitizer.jsm b/mobile/android/modules/Sanitizer.jsm
index 3782c92172f9..6b26e709df0a 100644
--- a/mobile/android/modules/Sanitizer.jsm
+++ b/mobile/android/modules/Sanitizer.jsm
@@ -124,18 +124,9 @@ Sanitizer.prototype = {
         sss.clearAll();
 
         // Clear push subscriptions
-        yield new Promise((resolve, reject) => {
-          let push = Cc["@mozilla.org/push/Service;1"]
-                       .getService(Ci.nsIPushService);
-          push.clearForDomain("*", status => {
-            if (Components.isSuccessCode(status)) {
-              resolve();
-            } else {
-              reject(new Error("Error clearing push subscriptions: " +
-                               status));
-            }
-          });
-        });
+        // Avoid throwing an error because Ci.nsIPushService isn't implemented
+        // All other clearing actions should succeed if we arrive here.
+        Promise.resolve();
         TelemetryStopwatch.finish("FX_SANITIZE_SITESETTINGS", refObj);
       }),
 
@@ -344,11 +335,8 @@ Sanitizer.prototype = {
       },
 
       canClear: function(aCallback) {
-        Accounts.anySyncAccountsExist().then(aCallback)
-          .catch(function(err) {
-            Cu.reportError("Java-side synced tabs clearing failed: " + err);
-            aCallback(false);
-          });
+        // We can't clear syncedTabs because Sync is non-functional
+        aCallback(false);
       }
     }
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits