Bug 1103692 - ReferenceError: bundle is not defined in webrtcUI.jsm. r=felipe, a=sledru
authorFlorian Quèze <florian@queze.net>
Fri, 16 Jan 2015 22:21:07 +0100
changeset 249361 1bc95fd35c4548e7c4f41264e919eb4c850807b7
parent 249360 a29b59c8a715e1001184249ceaa02981b62f4143
child 249362 71eebeeac8f6888d80c5295b32b15c539680e05a
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe, sledru
bugs1103692
milestone37.0a2
Bug 1103692 - ReferenceError: bundle is not defined in webrtcUI.jsm. r=felipe, a=sledru
browser/modules/webrtcUI.jsm
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -161,17 +161,19 @@ function getHost(uri, href) {
     host = uri.host;
   } catch (ex) {};
   if (!host) {
     if (uri && uri.scheme.toLowerCase() == "about") {
       // For about URIs, just use the full spec, without any #hash parts
       host = uri.specIgnoringRef;
     } else {
       // This is unfortunate, but we should display *something*...
-      host = bundle.getString("getUserMedia.sharingMenuUnknownHost");
+      const kBundleURI = "chrome://browser/locale/browser.properties";
+      let bundle = Services.strings.createBundle(kBundleURI);
+      host = bundle.GetStringFromName("getUserMedia.sharingMenuUnknownHost");
     }
   }
   return host;
 }
 
 function prompt(aBrowser, aRequest) {
   let {audioDevices: audioDevices, videoDevices: videoDevices,
        sharingScreen: sharingScreen, requestTypes: requestTypes} = aRequest;