summaryrefslogtreecommitdiffstats
path: root/toolkit/content/contentAreaUtils.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-01 23:45:36 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:26:11 +0200
commit4acc0d58cb0fa989d609972493be363c105f2594 (patch)
treeb0c4dfd608561041b83da74a1eba5739ab3931ec /toolkit/content/contentAreaUtils.js
parenta1c9dd468daa6d729c9d11416fb8a5c2dceb2c88 (diff)
downloadUXP-4acc0d58cb0fa989d609972493be363c105f2594.tar
UXP-4acc0d58cb0fa989d609972493be363c105f2594.tar.gz
UXP-4acc0d58cb0fa989d609972493be363c105f2594.tar.lz
UXP-4acc0d58cb0fa989d609972493be363c105f2594.tar.xz
UXP-4acc0d58cb0fa989d609972493be363c105f2594.zip
Issue #65 - Remove AppConstants from toolkit/content
Diffstat (limited to 'toolkit/content/contentAreaUtils.js')
-rw-r--r--toolkit/content/contentAreaUtils.js10
1 files changed, 4 insertions, 6 deletions
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(/^\.+/, "");