Backed out 2 changesets (bug 1603703) for xpc failures on test_storage_aggregates.js. CLOSED TREE
Backed out changeset 05dbbf7c379f (bug 1603703) Backed out changeset a1e723439116 (bug 1603703)
This commit is contained in:
10
netwerk/cache/nsDiskCacheDeviceSQL.cpp
vendored
10
netwerk/cache/nsDiskCacheDeviceSQL.cpp
vendored
@@ -1163,8 +1163,8 @@ nsresult nsOfflineCacheDevice::InitWithSqlite(mozIStorageService* ss) {
|
||||
mEvictionFunction = new nsOfflineCacheEvictionFunction(this);
|
||||
if (!mEvictionFunction) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
rv = mDB->RegisterFunction(NS_LITERAL_CSTRING("cache_eviction_observer"), 3,
|
||||
do_AddRef(mEvictionFunction));
|
||||
rv = mDB->CreateFunction(NS_LITERAL_CSTRING("cache_eviction_observer"), 3,
|
||||
mEvictionFunction);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// create all (most) of our statements up front
|
||||
@@ -2337,8 +2337,8 @@ nsresult nsOfflineCacheDevice::Evict(
|
||||
|
||||
nsresult rv;
|
||||
|
||||
rv = mDB->RegisterFunction(NS_LITERAL_CSTRING("ORIGIN_MATCH"), 1,
|
||||
MakeAndAddRef<OriginMatch>(aPattern));
|
||||
nsCOMPtr<mozIStorageFunction> function1(new OriginMatch(aPattern));
|
||||
rv = mDB->CreateFunction(NS_LITERAL_CSTRING("ORIGIN_MATCH"), 1, function1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
class AutoRemoveFunc {
|
||||
@@ -2346,7 +2346,7 @@ nsresult nsOfflineCacheDevice::Evict(
|
||||
mozIStorageConnection* mDB;
|
||||
explicit AutoRemoveFunc(mozIStorageConnection* aDB) : mDB(aDB) {}
|
||||
~AutoRemoveFunc() {
|
||||
mDB->UnregisterFunction(NS_LITERAL_CSTRING("ORIGIN_MATCH"));
|
||||
mDB->RemoveFunction(NS_LITERAL_CSTRING("ORIGIN_MATCH"));
|
||||
}
|
||||
};
|
||||
AutoRemoveFunc autoRemove(mDB);
|
||||
|
||||
Reference in New Issue
Block a user