mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 1207499 - Part 4: Remove use of expression closure from mobile/. r=mfinkle
--HG-- extra : commitid : ARFwLxJ3d4X extra : rebase_source : f1d4578096130a038d50a132bc3b7d3586f787fc
This commit is contained in:
parent
ee5f570ffb
commit
a72ceafdee
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user