summaryrefslogtreecommitdiff
path: root/common/content/history.js
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2015-06-06 23:12:40 +1000
committerDoug Kearns <dougkearns@gmail.com>2015-06-06 23:12:40 +1000
commitb236add69dfb8200d690c97b7f1b33d3e1f592e7 (patch)
tree15d6ed7a65536f091f583ac6a928c1747cf55ce7 /common/content/history.js
parent07b64b31979c1588ebcd3c7ff226082029744bc0 (diff)
downloadpentadactyl-b236add69dfb8200d690c97b7f1b33d3e1f592e7.tar.gz
Replace expression closures (function expressions - named and dynamic this).
Expression closures are to be axed. See https://bugzil.la/1083458. Leaving deprecated() and literal() calls and method shorthand syntax conversions until after the ESR overlap.
Diffstat (limited to 'common/content/history.js')
-rw-r--r--common/content/history.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/content/history.js b/common/content/history.js
index 70c2db48..fe410d73 100644
--- a/common/content/history.js
+++ b/common/content/history.js
@@ -65,12 +65,16 @@ var History = Module("history", {
let obj = [];
obj.__defineGetter__("index", () => sh.index);
obj.__defineSetter__("index", val => { webNav.gotoIndex(val); });
- obj[Symbol.iterator] = function () this.entries();
+ obj[Symbol.iterator] = function () { return this.entries(); };
for (let item of iter(sh.SHistoryEnumerator, Ci.nsISHEntry))
obj.push(update(Object.create(item), {
index: obj.length,
- icon: Class.Memoize(function () services.favicon.getFaviconImageForPage(this.URI).spec)
+ icon: Class.Memoize(function () {
+ return services.favicon
+ .getFaviconImageForPage(this.URI)
+ .spec;
+ })
}));
return obj;
},
@@ -348,7 +352,9 @@ var History = Module("history", {
if (maxItems && context.maxItems == null)
context.maxItems = 100;
context.regenerate = true;
- context.generate = function () history.get(context.filter, this.maxItems, sort);
+ context.generate = function () {
+ return history.get(context.filter, this.maxItems, sort);
+ };
};
completion.addUrlCompleter("history", "History", completion.history);