From 6f93b00559c8fe5b8dfaf59fcbaac8f1e0dd3366 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 23 Feb 2018 14:04:34 -0500 Subject: Restore toolkit/obsolete files and reinstate them to toolkit/content --- toolkit/content/strres.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 toolkit/content/strres.js (limited to 'toolkit/content/strres.js') diff --git a/toolkit/content/strres.js b/toolkit/content/strres.js new file mode 100644 index 000000000..928c8f75f --- /dev/null +++ b/toolkit/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; +} -- cgit v1.2.3