Bug 1161435 - netErrorURL should be resolved from start-manifest url. r=fabrice
authorPaul Rouget <paul@mozilla.com>
Fri, 15 May 2015 06:18:04 +0200
changeset 243985 60854c327e1c44a8ff47d2bb6012474021676c2b
parent 243984 e3829ae6310c1b1d6607e57cabbf997af7d3b1f3
child 243986 7b2518da658d01c61e3bcfdee3f7d1483d328565
push id28761
push usercbook@mozilla.com
push dateFri, 15 May 2015 14:50:10 +0000
treeherdermozilla-central@c0e709a5baca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1161435
milestone41.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 1161435 - netErrorURL should be resolved from start-manifest url. r=fabrice
b2g/components/B2GAboutRedirector.js
--- a/b2g/components/B2GAboutRedirector.js
+++ b/b2g/components/B2GAboutRedirector.js
@@ -7,21 +7,21 @@ const Ci = Components.interfaces;
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 function debug(msg) {
   //dump("B2GAboutRedirector: " + msg + "\n");
 }
 
 function netErrorURL() {
-  let uri = "app://system.gaiamobile.org/net_error.html";
-  try {
-    uri = Services.prefs.getCharPref("b2g.neterror.url");
-  } catch(e) {}
-  return uri;
+  let systemManifestURL = Services.prefs.getCharPref("b2g.system_manifest_url");
+  systemManifestURL = Services.io.newURI(systemManifestURL, null, null);
+  let netErrorURL = Services.prefs.getCharPref("b2g.neterror.url");
+  netErrorURL = Services.io.newURI(netErrorURL, null, systemManifestURL);
+  return netErrorURL.spec;
 }
 
 let modules = {
   certerror: {
     uri: "chrome://b2g/content/aboutCertError.xhtml",
     privileged: false,
     hide: true
   },