From 4acc0d58cb0fa989d609972493be363c105f2594 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 1 Feb 2020 23:45:36 -0500 Subject: Issue #65 - Remove AppConstants from toolkit/content --- toolkit/content/contentAreaUtils.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'toolkit/content/contentAreaUtils.js') diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js index 736fb7dfc..2512804fa 100644 --- a/toolkit/content/contentAreaUtils.js +++ b/toolkit/content/contentAreaUtils.js @@ -24,8 +24,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", "resource://gre/modules/Deprecated.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm"); @@ -1161,10 +1159,10 @@ function getNormalizedLeafName(aFile, aDefaultExtension) if (!aDefaultExtension) return aFile; - if (AppConstants.platform == "win") { - // Remove trailing dots and spaces on windows - aFile = aFile.replace(/[\s.]+$/, ""); - } +#ifdef XP_WIN + // Remove trailing dots and spaces on windows + aFile = aFile.replace(/[\s.]+$/, ""); +#endif // Remove leading dots aFile = aFile.replace(/^\.+/, ""); -- cgit v1.2.3