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:
Tooru Fujisawa 2015-09-23 18:42:18 +09:00
Родитель ee5f570ffb
Коммит a72ceafdee
4 изменённых файлов: 23 добавлений и 11 удалений

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

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