summaryrefslogtreecommitdiffstats
path: root/toolkit/obsolete/content/strres.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-08 23:31:09 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-08 23:31:09 -0500
commitb61927d4cdb92636758c4c80d5050b3266486529 (patch)
tree22c76a0c02613720c9600e30ac9b9680da34165d /toolkit/obsolete/content/strres.js
parent382c3272f342d08be5938d01ff1d11506a0053a3 (diff)
downloadUXP-b61927d4cdb92636758c4c80d5050b3266486529.tar
UXP-b61927d4cdb92636758c4c80d5050b3266486529.tar.gz
UXP-b61927d4cdb92636758c4c80d5050b3266486529.tar.lz
UXP-b61927d4cdb92636758c4c80d5050b3266486529.tar.xz
UXP-b61927d4cdb92636758c4c80d5050b3266486529.zip
Restore toolkit/obsolete
Diffstat (limited to 'toolkit/obsolete/content/strres.js')
-rw-r--r--toolkit/obsolete/content/strres.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/toolkit/obsolete/content/strres.js b/toolkit/obsolete/content/strres.js
new file mode 100644
index 000000000..928c8f75f
--- /dev/null
+++ b/toolkit/obsolete/content/strres.js
@@ -0,0 +1,28 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+var strBundleService = null;
+
+function srGetStrBundle(path)
+{
+ var strBundle = null;
+
+ if (!strBundleService) {
+ try {
+ strBundleService =
+ Components.classes["@mozilla.org/intl/stringbundle;1"].getService();
+ strBundleService =
+ strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);
+ } catch (ex) {
+ dump("\n--** strBundleService failed: " + ex + "\n");
+ return null;
+ }
+ }
+
+ strBundle = strBundleService.createBundle(path);
+ if (!strBundle) {
+ dump("\n--** strBundle createInstance failed **--\n");
+ }
+ return strBundle;
+}