From 43d1a1d645dc0436ef4951f9b8d1343209c884ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Tue, 4 Aug 2009 20:10:23 +0200 Subject: [PATCH] Bug 507881 - remove useless "|| null" fallback in browserGlue.sanitize(window) calls. r=gavin --- browser/base/content/browser-sets.inc | 2 +- browser/base/content/sanitize.js | 3 --- browser/components/preferences/privacy.js | 2 +- .../privatebrowsing/content/aboutPrivateBrowsing.xhtml | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index 4bf4f371bbbb..739d65a33108 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -126,7 +126,7 @@ + oncommand="Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);"/> diff --git a/browser/base/content/sanitize.js b/browser/base/content/sanitize.js index 42fdd6c823ec..3424d6a5c944 100644 --- a/browser/base/content/sanitize.js +++ b/browser/base/content/sanitize.js @@ -460,13 +460,10 @@ Sanitizer.showUI = function(aParentWindow) /** * Deletes privacy sensitive data in a batch, optionally showing the * sanitize UI, according to user preferences - * - * @returns null (displayed UI, which should handle errors) */ Sanitizer.sanitize = function(aParentWindow) { Sanitizer.showUI(aParentWindow); - return null; }; Sanitizer.onStartup = function() diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js index 059287d9ff9a..27f58015b116 100644 --- a/browser/components/preferences/privacy.js +++ b/browser/components/preferences/privacy.js @@ -548,7 +548,7 @@ var gPrivacyPane = { const Cc = Components.classes, Ci = Components.interfaces; var glue = Cc["@mozilla.org/browser/browserglue;1"] .getService(Ci.nsIBrowserGlue); - glue.sanitize(window || null); + glue.sanitize(window); // reset the timeSpan pref if (aClearEverything) diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml index 903cbbfe9bdf..69cc87a7e612 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml @@ -75,7 +75,7 @@ function openSanitizeDialog() { let browserGlue = Cc["@mozilla.org/browser/browserglue;1"]. getService(Ci.nsIBrowserGlue); - browserGlue.sanitize(mainWindow || null); + browserGlue.sanitize(mainWindow); } function setFavIcon(url) {