Bug 1237782 - Remove http override and add appcache pref r=baku

Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jonathan Kingston 2019-09-26 19:03:04 +00:00
parent 9dfc84144f
commit 495916342a
46 changed files with 112 additions and 164 deletions

View File

@ -7,7 +7,6 @@
[DEFAULT]
prefs =
browser.cache.offline.insecure.enable=true
plugin.load_flash_only=false # for plugin usage in browser_tab_dragdrop.js
support-files =
alltabslistener.html

View File

@ -490,6 +490,8 @@ add_task(async function test_form_entries() {
// Test for offline cache deletion
add_task(async function test_offline_cache() {
Services.prefs.setBoolPref("browser.cache.offline.enable", true);
Services.prefs.setBoolPref("browser.cache.offline.storage.enable", true);
// Prepare stuff, we will work with www.example.com
var URL = "http://www.example.com";
var URI = makeURI(URL);
@ -568,6 +570,8 @@ add_task(async function test_offline_cache() {
cacheListener
);
await wh.promiseClosed;
Services.prefs.clearUserPref("browser.cache.offline.enable");
Services.prefs.clearUserPref("browser.cache.offline.storage.enable");
});
// Test for offline apps permission deletion

View File

@ -2962,8 +2962,7 @@ bool nsGlobalWindowInner::IsPrivilegedChromeWindow(JSContext* aCx,
/* static */
bool nsGlobalWindowInner::OfflineCacheAllowedForContext(JSContext* aCx,
JSObject* aObj) {
return IsSecureContextOrObjectIsFromSecureContext(aCx, aObj) ||
Preferences::GetBool("browser.cache.offline.insecure.enable");
return IsSecureContextOrObjectIsFromSecureContext(aCx, aObj);
}
/* static */

View File

@ -2,117 +2,9 @@ const PATH =
"http://example.com/browser/dom/tests/mochitest/ajax/offline/";
const URL = PATH + "file_simpleManifest.html";
const MANIFEST = PATH + "file_simpleManifest.cacheManifest";
const PREF_INSECURE_APPCACHE = "browser.cache.offline.insecure.enable";
const PREF_NETWORK_PROXY = "network.proxy.type";
function setSJSState(sjsPath, stateQuery) {
let client = new XMLHttpRequest();
client.open("GET", sjsPath + "?state=" + stateQuery, false);
let appcachechannel = SpecialPowers.wrap(client).channel.QueryInterface(Ci.nsIApplicationCacheChannel);
return new Promise((resolve, reject) => {
client.addEventListener("load", resolve);
client.addEventListener("error", reject);
appcachechannel.chooseApplicationCache = false;
appcachechannel.inheritApplicationCache = false;
appcachechannel.applicationCache = null;
client.send();
});
}
add_task(async function() {
/* This test loads "evil" content and verified it isn't loaded when appcache is disabled, which emulates loading stale cache from an untrusted network:
- Sets frame to load "evil" content
- Loads HTML file which also loads and caches content into AppCache
- Sets frame to load "good"
- Check we still have "evil" content from AppCache
- Disables appcache
- Check content is "good"
*/
await SpecialPowers.pushPrefEnv({
set: [
[PREF_INSECURE_APPCACHE, true]
]
});
await setSJSState(PATH + "file_testFile.sjs", "evil");
await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
await ContentTask.spawn(gBrowser.selectedBrowser, null, async () => {
let windowPromise = new Promise((resolve, reject) => {
function init() {
if (content.document.readyState == "complete") {
const frame = content.document.getElementById("childframe");
const state = frame.contentDocument.getElementById("state");
is(state.textContent, "evil", "Loaded evil content");
resolve();
}
}
content.document.onreadystatechange = init;
init();
});
let appcachePromise = new Promise((resolve, reject) => {
function appcacheInit() {
if (content.applicationCache.status === content.applicationCache.IDLE) {
ok(true, "Application cache loaded");
resolve();
} else {
info("State was: " + content.applicationCache.status);
}
}
content.applicationCache.oncached = appcacheInit;
content.applicationCache.onnoupdate = appcacheInit;
content.applicationCache.onerror = () => {
ok(false, "Application cache failed");
reject();
};
appcacheInit();
});
await Promise.all([windowPromise, appcachePromise]);
});
gBrowser.removeCurrentTab();
// Turn network and proxy off so we can check the content loads still
await setSJSState(PATH + "file_testFile.sjs", "good");
Services.cache2.clear();
// Check we still have the "evil" content despite the state change
await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
await ContentTask.spawn(gBrowser.selectedBrowser, null, async () => {
const frame = content.document.getElementById("childframe");
const state = frame.contentDocument.getElementById("state");
is(state.textContent, "evil", "Loaded evil content from cache");
});
gBrowser.removeCurrentTab();
await SpecialPowers.pushPrefEnv({
set: [
[PREF_INSECURE_APPCACHE, false]
]
});
await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
// Check that the "good" content is back now appcache is disabled
await ContentTask.spawn(gBrowser.selectedBrowser, [URL], async (URL) => {
const frame = content.document.getElementById("childframe");
const state = frame.contentDocument.getElementById("state");
is(state.textContent, "good", "Loaded good content");
// Eval is needed to execure in child context.
content.window.eval("OfflineTest.clear()");
});
gBrowser.removeCurrentTab();
await setSJSState(PATH + "file_testFile.sjs", "");
await SpecialPowers.popPrefEnv();
});
add_task(async function test_pref_removes_api() {
await SpecialPowers.pushPrefEnv({
set: [
[PREF_INSECURE_APPCACHE, true]
]
});
await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
await ContentTask.spawn(gBrowser.selectedBrowser, null, async () => {
// Have to use in page checking as IsSecureContextOrObjectIsFromSecureContext is true for spawn()
@ -120,17 +12,4 @@ add_task(async function test_pref_removes_api() {
is(content.document.getElementById("hasOfflineResourceList").textContent, "yes", "OfflineResourceList is enabled");
});
gBrowser.removeCurrentTab();
await SpecialPowers.pushPrefEnv({
set: [
[PREF_INSECURE_APPCACHE, false]
]
});
await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
await ContentTask.spawn(gBrowser.selectedBrowser, [URL], async (URL) => {
is(content.document.getElementById("hasAppcache").textContent, "no", "Appcache is disabled");
is(content.document.getElementById("hasOfflineResourceList").textContent, "no", "OfflineResourceList is disabled");
content.window.eval("OfflineTest.clear()");
});
gBrowser.removeCurrentTab();
});

View File

@ -653,6 +653,15 @@
value: true
mirror: always
- name: browser.cache.offline.storage.enable
type: bool
#ifdef EARLY_BETA_OR_EARLIER
value: false
#else
value: true
#endif
mirror: always
- name: browser.cache.disk.enable
type: RelaxedAtomicBool
value: true

View File

@ -221,9 +221,6 @@ pref("browser.cache.check_doc_frequency", 3);
// The half life used to re-compute cache entries frecency in hours.
pref("browser.cache.frecency_half_life_hours", 6);
// AppCache over insecure connection is disabled by default
pref("browser.cache.offline.insecure.enable", false);
// offline cache capacity in kilobytes
pref("browser.cache.offline.capacity", 512000);

View File

@ -50,6 +50,7 @@ using namespace mozilla::net;
* nsCacheProfilePrefObserver
*****************************************************************************/
#define OFFLINE_CACHE_ENABLE_PREF "browser.cache.offline.enable"
#define OFFLINE_CACHE_STORAGE_ENABLE_PREF "browser.cache.offline.storage.enable"
#define OFFLINE_CACHE_DIR_PREF "browser.cache.offline.parent_directory"
#define OFFLINE_CACHE_CAPACITY_PREF "browser.cache.offline.capacity"
#define OFFLINE_CACHE_CAPACITY 512000
@ -63,6 +64,7 @@ static const char* observerList[] = {
static const char* prefList[] = {
OFFLINE_CACHE_ENABLE_PREF,
OFFLINE_CACHE_STORAGE_ENABLE_PREF,
OFFLINE_CACHE_CAPACITY_PREF,
OFFLINE_CACHE_DIR_PREF,
nullptr,
@ -78,6 +80,7 @@ class nsCacheProfilePrefObserver : public nsIObserver {
nsCacheProfilePrefObserver()
: mHaveProfile(false),
mOfflineCacheEnabled(false),
mOfflineStorageCacheEnabled(false),
mOfflineCacheCapacity(0),
mCacheCompressionLevel(CACHE_COMPRESSION_LEVEL),
mSanitizeOnShutdown(false),
@ -109,6 +112,7 @@ class nsCacheProfilePrefObserver : public nsIObserver {
nsCOMPtr<nsIFile> mDiskCacheParentDirectory;
bool mOfflineCacheEnabled;
bool mOfflineStorageCacheEnabled;
int32_t mOfflineCacheCapacity; // in kilobytes
nsCOMPtr<nsIFile> mOfflineCacheParentDirectory;
@ -237,9 +241,17 @@ void nsCacheProfilePrefObserver::PrefChanged(const char* aPref) {
if (!mHaveProfile) return;
// which preference changed?
nsresult rv;
if (!strcmp(OFFLINE_CACHE_ENABLE_PREF, aPref)) {
if (!strcmp(OFFLINE_CACHE_ENABLE_PREF, aPref) ||
!strcmp(OFFLINE_CACHE_STORAGE_ENABLE_PREF, aPref)) {
rv = Preferences::GetBool(OFFLINE_CACHE_ENABLE_PREF, &mOfflineCacheEnabled);
if (NS_FAILED(rv)) return;
if (NS_FAILED(rv)) {
return;
}
rv = Preferences::GetBool(OFFLINE_CACHE_STORAGE_ENABLE_PREF,
&mOfflineStorageCacheEnabled);
if (NS_FAILED(rv)) {
return;
}
nsCacheService::SetOfflineCacheEnabled(OfflineCacheEnabled());
} else if (!strcmp(OFFLINE_CACHE_CAPACITY_PREF, aPref)) {
@ -294,6 +306,11 @@ nsresult nsCacheProfilePrefObserver::ReadPrefs(nsIPrefBranch* branch) {
mOfflineCacheEnabled = true; // presume offline cache is enabled
(void)branch->GetBoolPref(OFFLINE_CACHE_ENABLE_PREF, &mOfflineCacheEnabled);
mOfflineStorageCacheEnabled =
true; // presume offline storage cache is enabled
(void)branch->GetBoolPref(OFFLINE_CACHE_STORAGE_ENABLE_PREF,
&mOfflineStorageCacheEnabled);
mOfflineCacheCapacity = OFFLINE_CACHE_CAPACITY;
(void)branch->GetIntPref(OFFLINE_CACHE_CAPACITY_PREF, &mOfflineCacheCapacity);
mOfflineCacheCapacity = std::max(0, mOfflineCacheCapacity);
@ -368,7 +385,7 @@ bool nsCacheProfilePrefObserver::OfflineCacheEnabled() {
if ((mOfflineCacheCapacity == 0) || (!mOfflineCacheParentDirectory))
return false;
return mOfflineCacheEnabled;
return mOfflineCacheEnabled && mOfflineStorageCacheEnabled;
}
int32_t nsCacheProfilePrefObserver::CacheCompressionLevel() {

View File

@ -129,6 +129,9 @@ function run_test() {
// Simulate a profile dir for xpcshell
do_get_profile();
Services.prefs.setBoolPref("browser.cache.offline.enable", true);
Services.prefs.setBoolPref("browser.cache.offline.storage.enable", true);
appCache = Cc["@mozilla.org/network/application-cache-service;1"]
.getService(Ci.nsIApplicationCacheService)
.getApplicationCache("fake-client-id|fake-group-id");

View File

@ -167,6 +167,7 @@ function run_test() {
httpserver.start(-1);
prefService.setBoolPref("browser.cache.offline.enable", false);
prefService.setBoolPref("browser.cache.offline.storage.enable", false);
prefService.setBoolPref("network.http.rcwn.enabled", false);
nextTest();

View File

@ -76,6 +76,7 @@ function init_profile() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -86,6 +86,12 @@ add_test(function test_noStore() {
function run_test() {
do_get_profile();
var ps = Cc["@mozilla.org/preferences-service;1"].getService(
Ci.nsIPrefBranch
);
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
httpServer = new HttpServer();
httpServer.registerPathHandler(basePath + normalEntry, normalHandler);
httpServer.registerPathHandler(basePath + noStoreEntry, noStoreHandler);

View File

@ -82,6 +82,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -82,6 +82,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -89,6 +89,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -89,6 +89,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -88,6 +88,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -89,6 +89,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -89,6 +89,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -89,6 +89,7 @@ function run_test() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -121,6 +121,7 @@ function run_test() {
Ci.nsIPrefBranch
);
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
// Set this pref to mimic the default browser behavior.
ps.setComplexValue(
"browser.cache.offline.parent_directory",

View File

@ -109,6 +109,7 @@ function init_profile() {
);
dump(ps.getBoolPref("browser.cache.offline.enable"));
ps.setBoolPref("browser.cache.offline.enable", true);
ps.setBoolPref("browser.cache.offline.storage.enable", true);
ps.setComplexValue(
"browser.cache.offline.parent_directory",
Ci.nsIFile,

View File

@ -1,4 +1,5 @@
[appcache.tentative.https.sub.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]
[Appcache!]
expected: FAIL

View File

@ -0,0 +1,2 @@
[appcache-iframe.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -1,4 +1,5 @@
[appcache-worker.https.html]
prefs: [browser.cache.offline.storage.enable:true]
disabled:
if verify: fails in verify mode
expected: TIMEOUT

View File

@ -0,0 +1,2 @@
[api_status_checking-manual.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_status_downloading-manual.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_status_idle.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_status_obsolete-manual.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_status_uncached.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_status_updateready-manual.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_swapcache-manual.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_swapcache_error.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[api_update.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -1,4 +1,5 @@
[api_update_error.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]
[INVALID_STATE_ERR error test]
expected: FAIL

View File

@ -1,2 +1,2 @@
[secure_context.html]
prefs: [browser.cache.offline.insecure.enable:false]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,4 @@
[no-appcache-in-shared-workers-historical.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]
disabled:
if (os == "win"): Bug 1581711

View File

@ -1,4 +1,5 @@
[appcache-ordering-main.https.html]
prefs: [browser.cache.offline.enable:true,browser.cache.offline.storage.enable:true]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1305877
expected:
if (e10s and (os == "win")) or ((os == "linux") and (bits == 64)): TIMEOUT

View File

@ -1,4 +1,5 @@
[claim-fetch-with-appcache.https.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1237782
[fetch() should be intercepted after the client is claimed.]
expected:
if (os == "linux") and debug and not webrender and e10s and not sw-e10s: FAIL

View File

@ -1,13 +0,0 @@
[claim-fetch.https.html]
[fetch() should be intercepted after the client is claimed.]
expected:
if (os == "linux") and debug and e10s and not sw-e10s and (processor == "x86"): FAIL
if (os == "linux") and debug and not webrender and e10s and sw-e10s: FAIL
if (os == "linux") and debug and webrender: FAIL
if (os == "linux") and not debug: FAIL
if os == "win": FAIL
if os == "mac": FAIL
if (os == "android") and not e10s: FAIL
if (os == "linux") and debug and not webrender and e10s: FAIL
FAIL

View File

@ -0,0 +1,2 @@
[clients-get.https.html]
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]

View File

@ -0,0 +1,2 @@
[clients-get.https.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1305877

View File

@ -1,4 +1,5 @@
[sxg-inner-resp-over-appcache.tentative.https.html]
prefs: [browser.cache.offline.storage.enable:true]
[SignedHTTPExchange inner resp should take precedence to appcache.]
expected: FAIL

View File

@ -1,4 +1,5 @@
[sxg-served-from-appcache.tentative.https.html]
prefs: [browser.cache.offline.storage.enable:true]
[SignedHTTPExchange cached in appcache should work.]
expected: FAIL

View File

@ -406,6 +406,8 @@ async function test_push_cleared() {
const { PushService } = serviceExports;
const userAgentID = "bd744428-f125-436a-b6d0-dd0c9845837f";
const channelID = "0ef2ad4a-6c49-41ad-af6e-95d2425276bf";
Services.prefs.setBoolPref("browser.cache.offline.storage.enable", true);
Services.prefs.setBoolPref("browser.cache.offline.enable", true);
let db = PushServiceWebSocket.newPushDB();

View File

@ -1,4 +1,5 @@
[DEFAULT]
prefs = [browser.cache.offline.enable = true, browser.cache.offline.storage.enable=true]
head = head_forgetaboutsite.js ../../../../dom/push/test/xpcshell/head.js
skip-if = toolkit == 'android'
support-files =

View File

@ -51,7 +51,6 @@ using namespace mozilla;
using namespace mozilla::dom;
static nsOfflineCacheUpdateService* gOfflineCacheUpdateService = nullptr;
static bool sAllowInsecureOfflineCache = true;
nsTHashtable<nsCStringHashKey>* nsOfflineCacheUpdateService::mAllowedDomains =
nullptr;
@ -239,8 +238,6 @@ NS_IMPL_ISUPPORTS(nsOfflineCacheUpdateService, nsIOfflineCacheUpdateService,
nsOfflineCacheUpdateService::nsOfflineCacheUpdateService()
: mDisabled(false), mUpdateRunning(false) {
MOZ_ASSERT(NS_IsMainThread());
Preferences::AddBoolVarCache(&sAllowInsecureOfflineCache,
"browser.cache.offline.insecure.enable", true);
}
nsOfflineCacheUpdateService::~nsOfflineCacheUpdateService() {
@ -542,9 +539,8 @@ static nsresult OfflineAppPermForPrincipal(nsIPrincipal* aPrincipal,
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(uri);
if (!innerURI) return NS_OK;
// only http and https applications can use offline APIs.
if (!(innerURI->SchemeIs("http") && sAllowInsecureOfflineCache) &&
!innerURI->SchemeIs("https")) {
// only https applications can use offline APIs.
if (!innerURI->SchemeIs("https")) {
return NS_OK;
}
@ -608,23 +604,25 @@ nsOfflineCacheUpdateService::AllowOfflineApp(nsIPrincipal* aPrincipal) {
return NS_ERROR_NOT_AVAILABLE;
}
if (!sAllowInsecureOfflineCache) {
nsCOMPtr<nsIURI> uri;
aPrincipal->GetURI(getter_AddRefs(uri));
if (!StaticPrefs::browser_cache_offline_storage_enable()) {
return NS_ERROR_NOT_AVAILABLE;
}
if (!uri) {
return NS_ERROR_NOT_AVAILABLE;
}
nsCOMPtr<nsIURI> uri;
aPrincipal->GetURI(getter_AddRefs(uri));
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(uri);
if (!innerURI) {
return NS_ERROR_NOT_AVAILABLE;
}
if (!uri) {
return NS_ERROR_NOT_AVAILABLE;
}
// if http then we should prevent this cache
if (innerURI->SchemeIs("http")) {
return NS_ERROR_NOT_AVAILABLE;
}
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(uri);
if (!innerURI) {
return NS_ERROR_NOT_AVAILABLE;
}
// if http then we should prevent this cache
if (innerURI->SchemeIs("http")) {
return NS_ERROR_NOT_AVAILABLE;
}
if (GeckoProcessType_Default != XRE_GetProcessType()) {