1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-15 17:03:32 +01:00

[bootstrap] Purge stale modules on upgrade as well as explicit rehash.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-25 18:41:32 -05:00
parent e5fd0ccf18
commit 26bd1c1075
6 changed files with 22 additions and 15 deletions

View File

@@ -249,10 +249,10 @@ var Overlay = Module("Overlay", {
util.dump("Loaded in " + (Date.now() - start) + "ms");
modules.events.addSessionListener(window, "unload", function onUnload() {
window.removeEventListener("unload", onUnload, false);
window.removeEventListener("unload", onUnload.wrapped, false);
for (let [, mod] in iter(modules))
if (mod instanceof ModuleBase && "destroy" in mod)
mod.destroy();
util.trapErrors(mod.destroy, mod);
}, false);
}
}));