Bug 1110585 - Inconsistent timestamp in storage metadata file; r=bent
authorJan Varga <jan.varga@gmail.com>
Thu, 08 Jan 2015 23:38:53 +0100
changeset 222809 20a7f674d668fdd19e0337f6f5847befc3a66fbf
parent 222807 86f3f3bee063e719039107fb7a04c0b98b384c92
child 222810 06402d84ac3d38c86214129c533911a520165e58
push id28074
push usercbook@mozilla.com
push dateFri, 09 Jan 2015 13:00:21 +0000
treeherdermozilla-central@ed280f6c7b39 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs1110585
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1110585 - Inconsistent timestamp in storage metadata file; r=bent
dom/quota/QuotaManager.cpp
--- a/dom/quota/QuotaManager.cpp
+++ b/dom/quota/QuotaManager.cpp
@@ -873,16 +873,20 @@ GetLastModifiedTime(nsIFile* aFile, int6
         }
 
         int64_t timestamp;
         rv = aFile->GetLastModifiedTime(&timestamp);
         if (NS_WARN_IF(NS_FAILED(rv))) {
           return rv;
         }
 
+        // Need to convert from milliseconds to microseconds.
+        MOZ_ASSERT((INT64_MAX / PR_USEC_PER_MSEC) > timestamp);
+        timestamp *= int64_t(PR_USEC_PER_MSEC);
+
         if (timestamp > *aTimestamp) {
           *aTimestamp = timestamp;
         }
         return NS_OK;
       }
 
       nsCOMPtr<nsISimpleEnumerator> entries;
       rv = aFile->GetDirectoryEntries(getter_AddRefs(entries));