[Pkg-mozext-commits] [adblock-plus] 444/464: issue #660 - create context info using 'fromLoadContext' method and switch appcache parameter to false
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit eb809bdd86aa54a4b6dcba48649f7b931817afcf
Author: Manvel Saroyan <manvel at adblockplus.org>
Date: Sat Jul 5 10:32:56 2014 +0400
issue #660 - create context info using 'fromLoadContext' method and switch appcache parameter to false
---
chrome/content/ui/sidebar.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/chrome/content/ui/sidebar.js b/chrome/content/ui/sidebar.js
index 7f515ea..92e82ef 100644
--- a/chrome/content/ui/sidebar.js
+++ b/chrome/content/ui/sidebar.js
@@ -200,6 +200,7 @@ function handleLocationChange()
if (item)
treeView.addItem(node, item, scanComplete);
});
+ cacheStorage = null;
}
// Fills a box with text splitting it up into multiple lines if necessary
@@ -302,10 +303,13 @@ function fillInTooltip(e) {
{
let {Services} = Cu.import("resource://gre/modules/Services.jsm", null);
// Cache v2 API is enabled by default starting with Gecko 32
- if (Services.vc.compare(Utils.platformVersion, "32.0") >= 0)
+ if (Services.vc.compare(Utils.platformVersion, "32.0a1") >= 0)
{
let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", null);
- cacheStorage = Services.cache2.diskCacheStorage(LoadContextInfo.default, true);
+ let loadContext = content.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsILoadContext);
+ cacheStorage = Services.cache2.diskCacheStorage(LoadContextInfo.fromLoadContext(loadContext, false), false);
}
else
cacheStorage = Services.cache.createSession("HTTP", Ci.nsICache.STORE_ANYWHERE, true);
@@ -325,7 +329,8 @@ function fillInTooltip(e) {
{
return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
},
- onCacheEntryAvailable: function (entry, isNew, appCache, status) {
+ onCacheEntryAvailable: function (entry, isNew, appCache, status)
+ {
if (!isNew)
showTooltipPreview();
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list