From b497a7e7b132aa72d7e8d559c07522e36a655c16 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 22 Nov 2012 11:15:17 -0500 Subject: [PATCH] Bug 792603 - Disable Fennec's reader mode entirely on low-memory platforms. r=lucasr --- mobile/android/chrome/content/browser.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index dc4d7b3f8ddc..8e84a1db04e8 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -3207,6 +3207,11 @@ Tab.prototype = { } }); + // For low-memory devices, don't allow reader mode since it takes up a lot of memory. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=792603 for details. + if (Cc["@mozilla.org/xpcom/memory-service;1"].getService(Ci.nsIMemory).isLowMemoryPlatform()) + return; + // Once document is fully loaded, parse it Reader.parseDocumentFromTab(this.id, function (article) { // Do nothing if there's no article or the page in this tab has