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 267082 01b4c5a22dd15a5c835bff44ef5cafb791281002
parent 267081 cde24f75ddb09baac5f7d9b24a7a9cdbaa7478ea
child 267083 0539704521a1eeeef3de0af13c3e93235f9357a7
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, sylvestre
bugs1150862
milestone39.0a2
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"].