Bug 996836 - Merge CLOSE and WRITE priority in cache2 I/O thread. r=michal
--- a/netwerk/cache2/CacheIOThread.h
+++ b/netwerk/cache2/CacheIOThread.h
@@ -31,17 +31,17 @@ public:
enum ELevel {
OPEN_PRIORITY,
READ_PRIORITY,
OPEN,
READ,
MANAGEMENT,
WRITE,
- CLOSE,
+ CLOSE = WRITE,
INDEX,
EVICT,
LAST_LEVEL,
// This is actually executed as the first level, but we want this enum
// value merely as an indicator while other values are used as indexes
// to the queue array. Hence put at end and not as the first.
XPCOM_LEVEL
--- a/netwerk/test/unit/test_cache2-30d-pinning-WasEvicted-API.js
+++ b/netwerk/test/unit/test_cache2-30d-pinning-WasEvicted-API.js
@@ -71,17 +71,17 @@ function run_test()
os.addObserver({
observe: function(subject, topic, data)
{
// (3)
log_("after purge");
// Prevent the I/O thread from evicting physically the data. We first want to re-open the entries.
// This deterministically emulates a slow hard drive.
- testingInterface.suspendCacheIOThread(8);
+ testingInterface.suspendCacheIOThread(7);
log_("clearing");
// Now clear everything except pinned. Stores the "ce_*" file and schedules background eviction.
get_cache_service().clear();
log_("cleared");
log_("second set of opens");
// Now open again. Pinned entries should be there, disk entries should be the renewed entries.