[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-60.3.0esr-8.5-1] Bug 28640 - Push notifications are disabled, so don't clear them
commit 10ca4718681668db7b0bdba0e3dd207dbe352cd8
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date: Fri Nov 30 04:51:05 2018 +0000
Bug 28640 - Push notifications are disabled, so don't clear them
This is a result of 28507. The new logic caused the stack trace:
: *************************
: A coding exception was thrown and uncaught in a Task.
:
: Full message: TypeError: Cc['@mozilla.org/push/Service;1'] is undefined
: Full stack: Sanitizer.prototype.items.siteSettings.clear</<@resource://gre/modules/Sanitizer.jsm:128:15
: Sanitizer.prototype.items.siteSettings.clear<@resource://gre/modules/Sanitizer.jsm:127:15
: TaskImpl_run@resource://gre/modules/Task.jsm:326:42
: TaskImpl@resource://gre/modules/Task.jsm:275:3
: asyncFunction@resource://gre/modules/Task.jsm:247:14
: _clear@resource://gre/modules/Sanitizer.jsm:59:14
: clearItem@resource://gre/modules/Sanitizer.jsm:40:14
: sanitize@chrome://browser/content/browser.js:1566:25
: onEvent@chrome://browser/content/browser.js:1787:9
:
: *************************
---
mobile/android/modules/Sanitizer.jsm | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/mobile/android/modules/Sanitizer.jsm b/mobile/android/modules/Sanitizer.jsm
index 3782c92172f9..2940dd81b217 100644
--- a/mobile/android/modules/Sanitizer.jsm
+++ b/mobile/android/modules/Sanitizer.jsm
@@ -124,18 +124,23 @@ Sanitizer.prototype = {
sss.clearAll();
// Clear push subscriptions
+ // Avoid throwing an error because nsIPushService isn't implemented
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));
- }
- });
+ reject(new Error("Error clearing 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));
+ // }
+ // });
+ //});
TelemetryStopwatch.finish("FX_SANITIZE_SITESETTINGS", refObj);
}),
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits