Bug 1207499 - Part 4: Remove use of expression closure from mobile/. r=mfinkle

This commit is contained in:
Tooru Fujisawa 2015-09-23 18:42:18 +09:00
parent 6af73d29af
commit 9aae6fe100
4 changed files with 23 additions and 11 deletions

View File

@ -266,8 +266,12 @@ DownloadItem.prototype = {
this);
},
get download() this._download,
get element() this._element,
get download() {
return this._download;
},
get element() {
return this._element;
},
createElement: function() {
let template = document.getElementById("download-item");
@ -312,10 +316,18 @@ DownloadItem.prototype = {
},
// template properties below
get domain() this._domain,
get fileName() this._fileName,
get id() this._id,
get iconUrl() this._iconUrl,
get domain() {
return this._domain;
},
get fileName() {
return this._fileName;
},
get id() {
return this._id;
},
get iconUrl() {
return this._iconUrl;
},
get size() {
if (this.download.hasProgress) {

View File

@ -9,7 +9,7 @@ Cu.import("resource://gre/modules/Services.jsm")
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm");
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
XPCOMUtils.defineLazyGetter(window, "gChromeWin", () =>
window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)

View File

@ -11,7 +11,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
XPCOMUtils.defineLazyGetter(window, "gChromeWin", () =>
window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)

View File

@ -434,9 +434,9 @@ function todo_check_null(condition, stack=Components.stack.caller) {
* do_check_matches([3,4,5], [3,4,5,6]) // fail; length doesn't match
*
* // functions in patterns get applied.
* do_check_matches({foo:function (v) v.length == 2}, {foo:"hi"}) // pass
* do_check_matches({foo:function (v) v.length == 2}, {bar:"hi"}) // fail
* do_check_matches({foo:function (v) v.length == 2}, {foo:"hello"}) // fail
* do_check_matches({foo:v => v.length == 2}, {foo:"hi"}) // pass
* do_check_matches({foo:v => v.length == 2}, {bar:"hi"}) // fail
* do_check_matches({foo:v => v.length == 2}, {foo:"hello"}) // fail
*
* // We don't check constructors, prototypes, or classes. However, if
* // pattern has a 'length' property, we require values to match that as