1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 13:05:54 +01:00

Cleanup module globals more eagerly.

This commit is contained in:
Kris Maglione
2011-01-13 17:10:27 -05:00
parent 97da21c4aa
commit 3e85415890
3 changed files with 23 additions and 16 deletions

View File

@@ -965,9 +965,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
services.observer.removeObserver(this, "dactyl-rehash");
defineModule.loadLog.push("dactyl: util: observe: dactyl-rehash");
if (this.rehashing)
JSMLoader.purge();
else
if (!this.rehashing)
for (let module in values(defineModule.modules)) {
defineModule.loadLog.push("dactyl: util: init(" + module + ")");
if (module.reinit)
@@ -978,7 +976,6 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
},
"dactyl-purge": function () {
this.rehashing = 1;
JSMLoader.purge();
},
"toplevel-window-ready": function (window, data) {
window.addEventListener("DOMContentLoaded", wrapCallback(function listener(event) {