diff options
author | Jesús <heckyel@hyperbola.info> | 2019-12-30 15:55:13 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-12-30 15:55:13 -0500 |
commit | 288df6a7bf8b933e2dc499e38f4915fcf974c14b (patch) | |
tree | 77bba994f260c064d3ee7f76c427ddfaa4f91710 /js/pagestats.js | |
parent | a2c9deaa145b780722e93b3899600f287c8094a4 (diff) | |
download | ematrix-288df6a7bf8b933e2dc499e38f4915fcf974c14b.tar.lz ematrix-288df6a7bf8b933e2dc499e38f4915fcf974c14b.tar.xz ematrix-288df6a7bf8b933e2dc499e38f4915fcf974c14b.zip |
backport
- Flush caches on upgrade
- Properly handle FrameModule's unloading
- Use the new module and remove the old implementation
Diffstat (limited to 'js/pagestats.js')
-rw-r--r-- | js/pagestats.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/pagestats.js b/js/pagestats.js index d5c2cdd..3490071 100644 --- a/js/pagestats.js +++ b/js/pagestats.js @@ -27,6 +27,8 @@ ηMatrix.pageStoreFactory = (function() { + Cu.import('chrome://ematrix/content/lib/UriTools.jsm'); + /******************************************************************************/ var ηm = ηMatrix; @@ -179,7 +181,7 @@ request.toFilter.length !== 0 ) { var roothn = tabContext.rootHostname, - hnFromURI = ηm.URI.hostnameFromURI, + hnFromURI = UriTools.hostnameFromURI, tMatrix = ηm.tMatrix; for ( entry of request.toFilter ) { if ( tMatrix.mustBlock(roothn, hnFromURI(entry.url), entry.type) === false ) { @@ -216,7 +218,7 @@ // - remember which hostname/type were seen // - count the number of distinct URLs for any given // hostname-type pair - var hostname = ηm.URI.hostnameFromURI(url), + var hostname = UriTools.hostnameFromURI(url), key = hostname + ' ' + type, uids = this.hostnameTypeCells.get(key); if ( uids === undefined ) { |