mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-03 22:54:12 +01:00
Flush the startup cache when re-sourcing a JS file.
This commit is contained in:
@@ -1652,6 +1652,13 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
}())
|
||||
}),
|
||||
|
||||
/**
|
||||
* Flushes the startup cache.
|
||||
*/
|
||||
flushCache: function flushCache() {
|
||||
services.observer.notifyObservers(null, "startupcache-invalidate", "");
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads dactyl in entirety by disabling the add-on and
|
||||
* re-enabling it.
|
||||
@@ -1659,7 +1666,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
rehash: function (args) {
|
||||
storage.session.commandlineArgs = args;
|
||||
this.timeout(function () {
|
||||
services.observer.notifyObservers(null, "startupcache-invalidate", "");
|
||||
this.flushCache();
|
||||
this.rehashing = true;
|
||||
let addon = config.addon;
|
||||
addon.userDisabled = true;
|
||||
|
||||
Reference in New Issue
Block a user