mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809056 - Reduce thumbnailing impact by capturing and storing only top sites. r=markh
This commit is contained in:
parent
ac9ff97905
commit
5814ec2ee9
@ -4,6 +4,8 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#endif
|
||||
|
||||
Cu.import("resource://gre/modules/NewTabUtils.jsm");
|
||||
|
||||
/**
|
||||
* Keeps thumbnails of open web pages up-to-date.
|
||||
*/
|
||||
@ -120,6 +122,10 @@ let gBrowserThumbnails = {
|
||||
},
|
||||
|
||||
_shouldCapture: function Thumbnails_shouldCapture(aBrowser) {
|
||||
// Capture only if it's a top site in about:newtab.
|
||||
if (NewTabUtils.links.getLinks().indexOf(aBrowser.currentURI.spec) < 0)
|
||||
return false;
|
||||
|
||||
// Capture only if it's the currently selected tab.
|
||||
if (aBrowser != gBrowser.selectedBrowser)
|
||||
return false;
|
||||
|
@ -621,7 +621,7 @@ let Links = {
|
||||
let pinnedLinks = Array.slice(PinnedLinks.links);
|
||||
|
||||
// Filter blocked and pinned links.
|
||||
let links = this._links.filter(function (link) {
|
||||
let links = (this._links || []).filter(function (link) {
|
||||
return !BlockedLinks.isBlocked(link) && !PinnedLinks.isPinned(link);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user