mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-13 11:15:46 +01:00
Death to E4X and stuff.
This commit is contained in:
@@ -118,7 +118,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
}
|
||||
},
|
||||
|
||||
closeWriter: function closeWriter() {
|
||||
closeWriter: util.wrapCallback(function closeWriter() {
|
||||
this.closeReader();
|
||||
|
||||
if (this._cacheWriter) {
|
||||
@@ -129,7 +129,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
if (this.cacheFile.fileSize <= 22)
|
||||
this.cacheFile.remove(false);
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
flush: function flush() {
|
||||
cache.cache = {};
|
||||
@@ -202,8 +202,12 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
return cache.force(name);
|
||||
},
|
||||
|
||||
get: function get(name) {
|
||||
get: function get(name, callback, self) {
|
||||
if (!Set.has(this.cache, name)) {
|
||||
if (callback && !(Set.has(this.providers, name) ||
|
||||
Set.has(this.localProviders, name)))
|
||||
this.register(name, callback, self);
|
||||
|
||||
this.cache[name] = this.force(name);
|
||||
util.assert(this.cache[name] !== undefined,
|
||||
"No such cache key", false);
|
||||
|
||||
Reference in New Issue
Block a user