Bug 672528 - Switch suite to use Services.strings r=neil
authorIan Neal <iann_cvs@blueyonder.co.uk>
Wed, 20 Jul 2011 13:54:45 +0100
changeset 8143 3e5e383e863f93d2e900040028187491930e05a2
parent 8142 6307d22ee150d81a0596e10109aab8e2c0b9fefc
child 8144 c93871cba778326fa621208e772e23ca0031e972
push id6259
push useriann_cvs@blueyonder.co.uk
push dateWed, 20 Jul 2011 12:54:57 +0000
treeherdercomm-central@3e5e383e863f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs672528
Bug 672528 - Switch suite to use Services.strings r=neil
suite/common/nsContextMenu.js
--- a/suite/common/nsContextMenu.js
+++ b/suite/common/nsContextMenu.js
@@ -907,19 +907,17 @@ nsContextMenu.prototype = {
         if (aRequest.status == NS_ERROR_SAVE_LINK_AS_TIMEOUT)
           return;
 
         clearTimeout(timer);
 
         // some other error occured; notify the user...
         if (!Components.isSuccessCode(aRequest.status)) {
           try {
-            const sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]
-                                  .getService(Components.interfaces.nsIStringBundleService);
-            const bundle = sbs.createBundle(
+            const bundle = Services.strings.createBundle(
                     "chrome://mozapps/locale/downloads/downloads.properties");
 
             const title = bundle.GetStringFromName("downloadErrorAlertTitle");
             const msg = bundle.GetStringFromName("downloadErrorGeneric");
 
             Services.prompt.alert(doc.defaultView, title, msg);
           } catch (ex) {}
           return;