Bug 1343191 - Displayed HTTP cache occupation size may overflow. r=michal
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 01 Mar 2017 09:23:00 -0500
changeset 374554 81930cfe918203caf05bda79bb9d01ec617c0f55
parent 374553 3575e9555c041a76a982292bf23d20a2f575cce6
child 374555 ba2210b23ab3c96094450b9be4bb05e2089dba20
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal
bugs1343191
milestone54.0a1
Bug 1343191 - Displayed HTTP cache occupation size may overflow. r=michal
netwerk/cache2/CacheStorageService.cpp
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -440,17 +440,17 @@ private:
         if (NS_FAILED(rv)) {
           if (mVisitEntries) {
             // both onStorageInfo and onCompleted are expected
             NS_DispatchToMainThread(this);
           }
           return NS_DispatchToMainThread(this);
         }
 
-        mSize = size << 10;
+        mSize = static_cast<uint64_t>(size) << 10;
 
         // Invoke onCacheStorageInfo with valid information.
         NS_DispatchToMainThread(this);
 
         if (!mVisitEntries) {
           return NS_OK; // done
         }