Bug 996836 - Merge CLOSE and WRITE priority in cache2 I/O thread. r=michal
authorHonza Bambas <honzab.moz@firemni.cz>
Tue, 05 Jan 2016 11:50:00 -0500
changeset 319855 1725b75a6604ee303ed83236c0caed41671de849
parent 319854 c0ca75feda8f22756f6cc17755a145e1a1bb585a
child 319856 4b71ca98d12c5dc54d69ccf98fe1a11a6d47558a
push id9104
push userbschouten@mozilla.com
push dateThu, 07 Jan 2016 23:59:08 +0000
reviewersmichal
bugs996836
milestone46.0a1
Bug 996836 - Merge CLOSE and WRITE priority in cache2 I/O thread. r=michal
netwerk/cache2/CacheIOThread.h
netwerk/test/unit/test_cache2-30d-pinning-WasEvicted-API.js
--- 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.