Bug 1150862, make about:reader unlinkable from content on mobile, r=margaret, a=sylvestre
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 03 Apr 2015 14:15:00 +0100
changeset 258496 a5203cabcc04
parent 258495 5c9df6adebed
child 258497 062e49bcb2da
push id4681
push usergijskruitbosch@gmail.com
push date2015-04-16 11:16 +0000
treeherdermozilla-beta@062e49bcb2da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, sylvestre
bugs1150862
milestone38.0
Bug 1150862, make about:reader unlinkable from content on mobile, r=margaret, a=sylvestre
mobile/android/components/AboutRedirector.js
--- a/mobile/android/components/AboutRedirector.js
+++ b/mobile/android/components/AboutRedirector.js
@@ -57,16 +57,17 @@ let modules = {
   },
   downloads: {
     uri: "chrome://browser/content/aboutDownloads.xhtml",
     privileged: true
   },
   reader: {
     uri: "chrome://global/content/reader/aboutReader.html",
     privileged: false,
+    dontLink: true,
     hide: true
   },
   feedback: {
     uri: "chrome://browser/content/aboutFeedback.xhtml",
     privileged: true
   },
   privatebrowsing: {
     uri: "chrome://browser/content/aboutPrivateBrowsing.xhtml",
@@ -104,16 +105,18 @@ AboutRedirector.prototype = {
   },
 
   // nsIAboutModule
   getURIFlags: function(aURI) {
     let flags;
     let moduleInfo = this._getModuleInfo(aURI);
     if (moduleInfo.hide)
       flags = Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT;
+    if (moduleInfo.dontLink)
+      flags = flags | Ci.nsIAboutModule.MAKE_UNLINKABLE;
 
     return flags | Ci.nsIAboutModule.ALLOW_SCRIPT;
   },
 
   newChannel: function(aURI, aLoadInfo) {
     let moduleInfo = this._getModuleInfo(aURI);
 
     var ios = Cc["@mozilla.org/network/io-service;1"].