From 5e3f00c1493645e464e77c643ee48cf2dca20888 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Sun, 1 Nov 2015 10:16:42 +0100 Subject: [PATCH 1/5] Bug 1220422 - Check if safe browsing's updateCheckers have already been set to null. r=gcp --- toolkit/components/url-classifier/content/listmanager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toolkit/components/url-classifier/content/listmanager.js b/toolkit/components/url-classifier/content/listmanager.js index bafabf312570..d37a35776e0d 100644 --- a/toolkit/components/url-classifier/content/listmanager.js +++ b/toolkit/components/url-classifier/content/listmanager.js @@ -259,8 +259,10 @@ PROT_ListManager.prototype.kickoffUpdate_ = function (onDiskTableData) PROT_ListManager.prototype.stopUpdateCheckers = function() { log("Stopping updates"); for (var updateUrl in this.updateCheckers_) { - this.updateCheckers_[updateUrl].cancel(); - this.updateCheckers_[updateUrl] = null; + if (this.updateCheckers_[updateUrl]) { + this.updateCheckers_[updateUrl].cancel(); + this.updateCheckers_[updateUrl] = null; + } } } From f3b461c82a5f8229d1021eec0d6c67a220c9f704 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Sun, 1 Nov 2015 21:20:17 +0100 Subject: [PATCH 2/5] Backout bug 1220442 for typo in bug number. r=backout --- toolkit/components/url-classifier/content/listmanager.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toolkit/components/url-classifier/content/listmanager.js b/toolkit/components/url-classifier/content/listmanager.js index d37a35776e0d..bafabf312570 100644 --- a/toolkit/components/url-classifier/content/listmanager.js +++ b/toolkit/components/url-classifier/content/listmanager.js @@ -259,10 +259,8 @@ PROT_ListManager.prototype.kickoffUpdate_ = function (onDiskTableData) PROT_ListManager.prototype.stopUpdateCheckers = function() { log("Stopping updates"); for (var updateUrl in this.updateCheckers_) { - if (this.updateCheckers_[updateUrl]) { - this.updateCheckers_[updateUrl].cancel(); - this.updateCheckers_[updateUrl] = null; - } + this.updateCheckers_[updateUrl].cancel(); + this.updateCheckers_[updateUrl] = null; } } From 3b20ee2cf4e689737314393d196f97ef4b9d6013 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Sun, 1 Nov 2015 10:16:42 +0100 Subject: [PATCH 3/5] Bug 1220442 - Check if safe browsing's updateCheckers have already been set to null. r=gcp --- toolkit/components/url-classifier/content/listmanager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toolkit/components/url-classifier/content/listmanager.js b/toolkit/components/url-classifier/content/listmanager.js index bafabf312570..d37a35776e0d 100644 --- a/toolkit/components/url-classifier/content/listmanager.js +++ b/toolkit/components/url-classifier/content/listmanager.js @@ -259,8 +259,10 @@ PROT_ListManager.prototype.kickoffUpdate_ = function (onDiskTableData) PROT_ListManager.prototype.stopUpdateCheckers = function() { log("Stopping updates"); for (var updateUrl in this.updateCheckers_) { - this.updateCheckers_[updateUrl].cancel(); - this.updateCheckers_[updateUrl] = null; + if (this.updateCheckers_[updateUrl]) { + this.updateCheckers_[updateUrl].cancel(); + this.updateCheckers_[updateUrl] = null; + } } } From eaebce9463296c084a6b7e4d395a4da187f83739 Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Sun, 1 Nov 2015 17:11:23 -0800 Subject: [PATCH 4/5] Bug 1216271 - Follow-up to add L10N notes and fix style to use an early return. r=me --HG-- extra : commitid : 4zmXYvp642p --- browser/base/content/test/alerts/head.js | 13 ++++++++----- .../locales/en-US/chrome/browser/browser.properties | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/browser/base/content/test/alerts/head.js b/browser/base/content/test/alerts/head.js index cf160c21ac8e..ae92077ef21d 100644 --- a/browser/base/content/test/alerts/head.js +++ b/browser/base/content/test/alerts/head.js @@ -6,10 +6,11 @@ function promiseAlertWindow() { alertWindow.addEventListener("load", function onLoad() { alertWindow.removeEventListener("load", onLoad); let windowType = alertWindow.document.documentElement.getAttribute("windowtype"); - if (windowType == "alert:alert") { - Services.wm.removeListener(listener); - resolve(alertWindow); + if (windowType != "alert:alert") { + return; } + Services.wm.removeListener(listener); + resolve(alertWindow); }); }, }; @@ -17,8 +18,10 @@ function promiseAlertWindow() { }); } -// `promiseWindowClosed` is similar to `BrowserTestUtils.closeWindow`, but -// doesn't call `window.close()`. +/** + * Similar to `BrowserTestUtils.closeWindow`, but + * doesn't call `window.close()`. + */ function promiseWindowClosed(window) { return new Promise(function(resolve) { Services.ww.registerNotification(function observer(subject, topic, data) { diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index 341622d6414f..9b000d9cd163 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -382,7 +382,9 @@ webNotifications.alwaysReceive.accesskey=A webNotifications.neverShow=Always Block Notifications webNotifications.neverShow.accesskey=N webNotifications.receiveFromSite=Would you like to receive notifications from this site? +# LOCALIZATION NOTE (webNotifications.upgradeTitle): When using native notifications on OS X, the title may be truncated around 32 characters. webNotifications.upgradeTitle=Upgraded notifications +# LOCALIZATION NOTE (webNotifications.upgradeInfo): When using native notifications on OS X, the body may be truncated around 100 characters in some views. webNotifications.upgradeInfo=You will receive notifications from sites, even those not open in a tab. Click to learn more. # Pointer lock UI From 3889d784094e304fbf5beaba4b22ccbd3b86fdd2 Mon Sep 17 00:00:00 2001 From: Kit Cambridge Date: Sun, 1 Nov 2015 17:15:23 -0800 Subject: [PATCH 5/5] Bug 1219832 - Use "send" instead of "receive" in notification preferences. r=MattN --HG-- extra : commitid : E2D3YWpHPq8 --- browser/components/preferences/in-content/content.js | 2 +- browser/components/preferences/in-content/content.xul | 2 +- browser/locales/en-US/chrome/browser/preferences/content.dtd | 2 +- .../en-US/chrome/browser/preferences/preferences.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/browser/components/preferences/in-content/content.js b/browser/components/preferences/in-content/content.js index 3784e451277f..5ce0c3311576 100644 --- a/browser/components/preferences/in-content/content.js +++ b/browser/components/preferences/in-content/content.js @@ -127,7 +127,7 @@ var gContentPane = { let bundlePreferences = document.getElementById("bundlePreferences"); let params = { permissionType: "desktop-notification" }; params.windowTitle = bundlePreferences.getString("notificationspermissionstitle"); - params.introText = bundlePreferences.getString("notificationspermissionstext3"); + params.introText = bundlePreferences.getString("notificationspermissionstext4"); gSubDialog.open("chrome://browser/content/preferences/permissions.xul", "resizable=yes", params); diff --git a/browser/components/preferences/in-content/content.xul b/browser/components/preferences/in-content/content.xul index 71e0c15fa0fc..89467a5c2d3c 100644 --- a/browser/components/preferences/in-content/content.xul +++ b/browser/components/preferences/in-content/content.xul @@ -70,7 +70,7 @@ - +