Bug 1103692 - ReferenceError: bundle is not defined in webrtcUI.jsm, r=felipe.
authorFlorian Quèze <florian@queze.net>
Fri, 16 Jan 2015 22:21:07 +0100
changeset 224340 0b8ec9a2c5e335999b05328c79a42b2ee9991252
parent 224339 03d7a18981e416258e23c046908d174e06efa0ac
child 224341 001501ed6cbc8b48ad230536b91bec12cbe75252
push id54190
push userkwierso@gmail.com
push dateSat, 17 Jan 2015 02:06:29 +0000
treeherdermozilla-inbound@369a8f14ccf8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1103692
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1103692 - ReferenceError: bundle is not defined in webrtcUI.jsm, r=felipe.
browser/modules/webrtcUI.jsm
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -166,17 +166,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;