1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-10 13:04:12 +01:00

Closes issue #729.

This commit is contained in:
Kris Maglione
2011-11-28 08:46:07 -05:00
parent 42aa15d786
commit 81271ab4ef
2 changed files with 13 additions and 3 deletions

View File

@@ -19,9 +19,8 @@ var states = iter([v, k.slice(prefix.length).toLowerCase()]
var Download = Class("Download", {
init: function init(id, list) {
let self = XPCSafeJSObjectWrapper(services.downloadManager.getDownload(id));
self.__proto__ = this;
this.instance = this;
let self = this;
this.download = services.downloadManager.getDownload(id);
this.list = list;
this.nodes = {
@@ -192,6 +191,14 @@ var Download = Class("Download", {
this.updateProgress();
}
});
Object.keys(XPCOMShim([Ci.nsIDownload])).forEach(function (key) {
if (!(key in Download.prototype))
Object.defineProperty(Download.prototype, key, {
get: function get() this.download[key],
set: function set(val) this.download[key] = val,
configurable: true
});
});
var DownloadList = Class("DownloadList",
XPCOM([Ci.nsIDownloadProgressListener,