1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-31 16:42:27 +01:00

Some ensurance against :downloads cleanup handler not being called.

This commit is contained in:
Kris Maglione
2011-01-17 23:31:46 -05:00
parent 96467a553d
commit 99e04e7d97

View File

@@ -198,9 +198,11 @@ var DownloadList = Class("DownloadList",
for (let row in iter(services.downloadManager.DBConnection
.createStatement("SELECT id FROM moz_downloads")))
this.addDownload(row.id);
},
initialize: function initialize() {
util.addObserver(this);
services.downloadManager.addListener(this);
return this.nodes.list;
},
cleanup: function cleanup() {
this.observe.unregister();
@@ -286,7 +288,7 @@ var Downloads = Module("downloads", {
get: function params() downloads,
set: function params(val) { throw FailedAssertion("Not replacing mode change handler", 1) }
});
return downloads.nodes.list;
return downloads.initialize();
});
});
},