[Pkg-mozext-commits] [firebug] 27/56: Issue 7654: Don't use LoadContextInfo.default for opening HTTP cache entries
David Prévot
taffit at moszumanska.debian.org
Wed Nov 19 21:01:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 4ced8f9cbf05ddd901aeb99895c9270abbf5d29a
Author: Jan Odvarko <odvarko at gmail.com>
Date: Tue Oct 21 14:25:40 2014 +0200
Issue 7654: Don't use LoadContextInfo.default for opening HTTP cache entries
---
extension/content/firebug/net/netCacheReader.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/extension/content/firebug/net/netCacheReader.js b/extension/content/firebug/net/netCacheReader.js
index c838ef3..b87be2a 100644
--- a/extension/content/firebug/net/netCacheReader.js
+++ b/extension/content/firebug/net/netCacheReader.js
@@ -5,6 +5,7 @@ define([
"firebug/chrome/module",
"firebug/lib/object",
"firebug/lib/locale",
+ "firebug/lib/http",
"firebug/lib/trace",
"firebug/lib/dom",
"firebug/lib/css",
@@ -13,7 +14,7 @@ define([
"firebug/net/netUtils",
"firebug/lib/domplate",
],
-function(Firebug, Module, Obj, Locale, FBTrace, Dom, Css, Url, NetMonitor, NetUtils, Domplate) {
+function(Firebug, Module, Obj, Locale, Http, FBTrace, Dom, Css, Url, NetMonitor, NetUtils, Domplate) {
"use strict"
@@ -240,7 +241,18 @@ function fetchCacheEntryNew(file, netProgress)
{
var { LoadContextInfo } = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
var cacheService = CacheStorageService.getService(Ci.nsICacheStorageService);
- cacheSession = cacheService.diskCacheStorage(LoadContextInfo.default, false);
+ var defaultLoadContext = LoadContextInfo.default;
+ var win = Http.getWindowForRequest(file.request);
+ if (win)
+ {
+ let loadContext = win.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsILoadContext);
+
+ defaultLoadContext = LoadContextInfo.fromLoadContext(loadContext, false)
+ }
+
+ cacheSession = cacheService.diskCacheStorage(defaultLoadContext, false);
}
cacheSession.asyncOpenURI(Url.makeURI(file.href), "", Ci.nsICacheStorage.OPEN_NORMALLY,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list