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:
@@ -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();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user