Bug 792603 - Disable Fennec's reader mode entirely on low-memory platforms. r=lucasr

This commit is contained in:
Kartikaya Gupta 2012-11-22 11:15:17 -05:00
Родитель ef463c5159
Коммит b497a7e7b1
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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