diff --git a/content/base/src/nsDOMFile.cpp b/content/base/src/nsDOMFile.cpp index b9152825616..c1f2f362614 100644 --- a/content/base/src/nsDOMFile.cpp +++ b/content/base/src/nsDOMFile.cpp @@ -494,7 +494,7 @@ nsDOMFileFile::GetMozFullPathInternal(nsAString &aFilename) NS_IMETHODIMP nsDOMFileFile::GetLastModifiedDate(JSContext* cx, JS::Value *aLastModifiedDate) { - int64_t msecs; + PRTime msecs; mFile->GetLastModifiedTime(&msecs); JSObject* date = JS_NewDateObjectMsec(cx, msecs); if (date) { diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 35bb2f5d614..9b267f6ae7b 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -316,7 +316,7 @@ DeviceStorageFile::collectFilesInternal(nsTArray > & while (NS_SUCCEEDED(files->GetNextFile(getter_AddRefs(f))) && f) { - int64_t msecs; + PRTime msecs; f->GetLastModifiedTime(&msecs); if (msecs < aSince) { diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 49caa409e3c..b4233fab780 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2004,7 +2004,7 @@ namespace { int64_t GetPluginLastModifiedTime(const nsCOMPtr& localfile) { - int64_t fileModTime = LL_ZERO; + PRTime fileModTime = LL_ZERO; #if defined(XP_MACOSX) // On OS X the date of a bundle's "contents" (i.e. of its Info.plist file) diff --git a/image/src/imgLoader.cpp b/image/src/imgLoader.cpp index f51a666f040..ea51e8def3c 100644 --- a/image/src/imgLoader.cpp +++ b/image/src/imgLoader.cpp @@ -1284,7 +1284,7 @@ bool imgLoader::ValidateEntry(imgCacheEntry *aEntry, nsCOMPtr theFile; rv = fileUrl->GetFile(getter_AddRefs(theFile)); if (NS_SUCCEEDED(rv)) { - int64_t fileLastMod; + PRTime fileLastMod; rv = theFile->GetLastModifiedTime(&fileLastMod); if (NS_SUCCEEDED(rv)) { // nsIFile uses millisec, NSPR usec diff --git a/modules/libjar/zipwriter/src/nsZipWriter.cpp b/modules/libjar/zipwriter/src/nsZipWriter.cpp index 35594ce0cce..26d946d9d3e 100644 --- a/modules/libjar/zipwriter/src/nsZipWriter.cpp +++ b/modules/libjar/zipwriter/src/nsZipWriter.cpp @@ -364,7 +364,7 @@ NS_IMETHODIMP nsZipWriter::AddEntryFile(const nsACString & aZipEntry, rv = aFile->IsDirectory(&isdir); NS_ENSURE_SUCCESS(rv, rv); - int64_t modtime; + PRTime modtime; rv = aFile->GetLastModifiedTime(&modtime); NS_ENSURE_SUCCESS(rv, rv); modtime *= PR_USEC_PER_MSEC; diff --git a/netwerk/base/src/nsDirectoryIndexStream.cpp b/netwerk/base/src/nsDirectoryIndexStream.cpp index b7fb7ed6396..53e690afaa7 100644 --- a/netwerk/base/src/nsDirectoryIndexStream.cpp +++ b/netwerk/base/src/nsDirectoryIndexStream.cpp @@ -278,7 +278,7 @@ nsDirectoryIndexStream::Read(char* aBuf, uint32_t aCount, uint32_t* aReadCount) int64_t fileSize = 0; current->GetFileSize( &fileSize ); - int64_t fileInfoModifyTime = 0; + PRTime fileInfoModifyTime = 0; current->GetLastModifiedTime( &fileInfoModifyTime ); fileInfoModifyTime *= PR_USEC_PER_MSEC; diff --git a/profile/dirserviceprovider/src/nsProfileLock.cpp b/profile/dirserviceprovider/src/nsProfileLock.cpp index 3f38bc43f7a..b5db8a1ad01 100644 --- a/profile/dirserviceprovider/src/nsProfileLock.cpp +++ b/profile/dirserviceprovider/src/nsProfileLock.cpp @@ -426,7 +426,7 @@ PR_BEGIN_MACRO \ } #endif /* XP_UNIX */ -nsresult nsProfileLock::GetReplacedLockTime(int64_t *aResult) { +nsresult nsProfileLock::GetReplacedLockTime(PRTime *aResult) { *aResult = mReplacedLockTime; return NS_OK; } diff --git a/profile/dirserviceprovider/src/nsProfileLock.h b/profile/dirserviceprovider/src/nsProfileLock.h index ad66a7f5e52..a51e25e145c 100644 --- a/profile/dirserviceprovider/src/nsProfileLock.h +++ b/profile/dirserviceprovider/src/nsProfileLock.h @@ -59,11 +59,11 @@ public: /** * Get the modification time of a replaced profile lock, otherwise 0. */ - nsresult GetReplacedLockTime(int64_t* aResult); + nsresult GetReplacedLockTime(PRTime* aResult); private: bool mHaveLock; - int64_t mReplacedLockTime; + PRTime mReplacedLockTime; #if defined (XP_WIN) HANDLE mLockFileHandle; diff --git a/rdf/datasource/src/nsFileSystemDataSource.cpp b/rdf/datasource/src/nsFileSystemDataSource.cpp index 40aebb60b68..e9b4ed2c400 100644 --- a/rdf/datasource/src/nsFileSystemDataSource.cpp +++ b/rdf/datasource/src/nsFileSystemDataSource.cpp @@ -1133,7 +1133,7 @@ FileSystemDataSource::GetLastMod(nsIRDFResource *source, nsIRDFDate **aResult) // ensure that we DO NOT resolve aliases aFile->SetFollowLinks(false); - int64_t lastModDate; + PRTime lastModDate; if (NS_FAILED(rv = aFile->GetLastModifiedTime(&lastModDate))) return(rv); diff --git a/toolkit/components/filepicker/nsFileView.cpp b/toolkit/components/filepicker/nsFileView.cpp index 1e4f3e0d234..cda6e7181a9 100644 --- a/toolkit/components/filepicker/nsFileView.cpp +++ b/toolkit/components/filepicker/nsFileView.cpp @@ -750,7 +750,7 @@ nsFileView::GetCellText(int32_t aRow, nsITreeColumn* aCol, if (NS_LITERAL_STRING("FilenameColumn").Equals(colID)) { curFile->GetLeafName(aCellText); } else if (NS_LITERAL_STRING("LastModifiedColumn").Equals(colID)) { - int64_t lastModTime; + PRTime lastModTime; curFile->GetLastModifiedTime(&lastModTime); // XXX FormatPRTime could take an nsAString& nsAutoString temp; @@ -946,7 +946,7 @@ SortDateCallback(const void* aElement1, const void* aElement2, void* aContext) nsIFile* file1 = *static_cast(aElement1); nsIFile* file2 = *static_cast(aElement2); - int64_t time1, time2; + PRTime time1, time2; file1->GetLastModifiedTime(&time1); file2->GetLastModifiedTime(&time2); diff --git a/toolkit/components/places/Database.cpp b/toolkit/components/places/Database.cpp index e2979d879ce..0f65472d7b5 100644 --- a/toolkit/components/places/Database.cpp +++ b/toolkit/components/places/Database.cpp @@ -90,7 +90,7 @@ hasRecentCorruptDB() if (NS_SUCCEEDED(currFile->GetLeafName(leafName)) && leafName.Length() >= DATABASE_CORRUPT_FILENAME.Length() && leafName.Find(".corrupt", DATABASE_FILENAME.Length()) != -1) { - int64_t lastMod = 0; + PRTime lastMod = 0; currFile->GetLastModifiedTime(&lastMod); NS_ENSURE_TRUE(lastMod > 0, false); return (PR_Now() - lastMod) > RECENT_BACKUP_TIME_MICROSEC; diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 14c806f952f..057f688f8e8 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -957,7 +957,7 @@ nsAppStartup::TrackStartupCrashBegin(bool *aIsSafeModeNecessary) xr->GetInSafeMode(&inSafeMode); - int64_t replacedLockTime; + PRTime replacedLockTime; rv = xr->GetReplacedLockTime(&replacedLockTime); if (NS_FAILED(rv) || !replacedLockTime) { diff --git a/toolkit/profile/nsIToolkitProfile.idl b/toolkit/profile/nsIToolkitProfile.idl index 084258c1106..2e217bb96b0 100644 --- a/toolkit/profile/nsIToolkitProfile.idl +++ b/toolkit/profile/nsIToolkitProfile.idl @@ -34,7 +34,7 @@ interface nsIProfileLock : nsISupports /** * The timestamp of an existing profile lock at lock time. */ - readonly attribute int64_t replacedLockTime; + readonly attribute PRTime replacedLockTime; /** * Unlock the profile. diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp index 150f690fa86..8add04c79f4 100644 --- a/toolkit/profile/nsToolkitProfileService.cpp +++ b/toolkit/profile/nsToolkitProfileService.cpp @@ -352,7 +352,7 @@ nsToolkitProfileLock::Unlock() } NS_IMETHODIMP -nsToolkitProfileLock::GetReplacedLockTime(int64_t *aResult) +nsToolkitProfileLock::GetReplacedLockTime(PRTime *aResult) { mLock.GetReplacedLockTime(aResult); return NS_OK; diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 17e6478cabc..4cb024906ae 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -810,7 +810,7 @@ nsXULAppInfo::InvalidateCachesOnRestart() } NS_IMETHODIMP -nsXULAppInfo::GetReplacedLockTime(int64_t *aReplacedLockTime) +nsXULAppInfo::GetReplacedLockTime(PRTime *aReplacedLockTime) { if (!gProfileLock) return NS_ERROR_NOT_AVAILABLE; diff --git a/xpcom/io/nsIFile.idl b/xpcom/io/nsIFile.idl index 9433c132f60..a9b5cb7c085 100644 --- a/xpcom/io/nsIFile.idl +++ b/xpcom/io/nsIFile.idl @@ -188,8 +188,8 @@ interface nsIFile : nsISupports * midnight (00:00:00), January 1, 1970 Greenwich Mean * Time (GMT). */ - attribute int64_t lastModifiedTime; - attribute int64_t lastModifiedTimeOfLink; + attribute PRTime lastModifiedTime; + attribute PRTime lastModifiedTimeOfLink; /** * WARNING! On the Mac, getting/setting the file size with nsIFile diff --git a/xpcom/io/nsLocalFileOS2.cpp b/xpcom/io/nsLocalFileOS2.cpp index 0bed86dec1f..83becde55f9 100644 --- a/xpcom/io/nsLocalFileOS2.cpp +++ b/xpcom/io/nsLocalFileOS2.cpp @@ -1702,7 +1702,7 @@ nsLocalFile::Remove(bool recursive) } NS_IMETHODIMP -nsLocalFile::GetLastModifiedTime(int64_t *aLastModifiedTime) +nsLocalFile::GetLastModifiedTime(PRTime *aLastModifiedTime) { // Check we are correctly initialized. CHECK_mWorkingPath(); @@ -1723,14 +1723,14 @@ nsLocalFile::GetLastModifiedTime(int64_t *aLastModifiedTime) NS_IMETHODIMP -nsLocalFile::GetLastModifiedTimeOfLink(int64_t *aLastModifiedTime) +nsLocalFile::GetLastModifiedTimeOfLink(PRTime *aLastModifiedTime) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP -nsLocalFile::SetLastModifiedTime(int64_t aLastModifiedTime) +nsLocalFile::SetLastModifiedTime(PRTime aLastModifiedTime) { // Check we are correctly initialized. CHECK_mWorkingPath(); @@ -1740,13 +1740,13 @@ nsLocalFile::SetLastModifiedTime(int64_t aLastModifiedTime) NS_IMETHODIMP -nsLocalFile::SetLastModifiedTimeOfLink(int64_t aLastModifiedTime) +nsLocalFile::SetLastModifiedTimeOfLink(PRTime aLastModifiedTime) { return NS_ERROR_NOT_IMPLEMENTED; } nsresult -nsLocalFile::SetModDate(int64_t aLastModifiedTime) +nsLocalFile::SetModDate(PRTime aLastModifiedTime) { nsresult rv = Stat(); diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index 5f30160a093..aebadcacbc8 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -963,7 +963,7 @@ nsLocalFile::Remove(bool recursive) } NS_IMETHODIMP -nsLocalFile::GetLastModifiedTime(int64_t *aLastModTime) +nsLocalFile::GetLastModifiedTime(PRTime *aLastModTime) { CHECK_mPath(); NS_ENSURE_ARG(aLastModTime); @@ -971,17 +971,17 @@ nsLocalFile::GetLastModifiedTime(int64_t *aLastModTime) PRFileInfo64 info; if (PR_GetFileInfo64(mPath.get(), &info) != PR_SUCCESS) return NSRESULT_FOR_ERRNO(); - int64_t modTime = int64_t(info.modifyTime); + PRTime modTime = info.modifyTime; if (modTime == 0) *aLastModTime = 0; else - *aLastModTime = modTime / int64_t(PR_USEC_PER_MSEC); + *aLastModTime = modTime / PR_USEC_PER_MSEC; return NS_OK; } NS_IMETHODIMP -nsLocalFile::SetLastModifiedTime(int64_t aLastModTime) +nsLocalFile::SetLastModifiedTime(PRTime aLastModTime) { CHECK_mPath(); @@ -992,7 +992,7 @@ nsLocalFile::SetLastModifiedTime(int64_t aLastModTime) ut.actime = mCachedStat.st_atime; // convert milliseconds to seconds since the unix epoch - ut.modtime = (time_t)(double(aLastModTime) / PR_MSEC_PER_SEC); + ut.modtime = (time_t)(aLastModTime / PR_MSEC_PER_SEC); result = utime(mPath.get(), &ut); } else { result = utime(mPath.get(), nullptr); @@ -1001,7 +1001,7 @@ nsLocalFile::SetLastModifiedTime(int64_t aLastModTime) } NS_IMETHODIMP -nsLocalFile::GetLastModifiedTimeOfLink(int64_t *aLastModTimeOfLink) +nsLocalFile::GetLastModifiedTimeOfLink(PRTime *aLastModTimeOfLink) { CHECK_mPath(); NS_ENSURE_ARG(aLastModTimeOfLink); @@ -1009,7 +1009,7 @@ nsLocalFile::GetLastModifiedTimeOfLink(int64_t *aLastModTimeOfLink) struct STAT sbuf; if (LSTAT(mPath.get(), &sbuf) == -1) return NSRESULT_FOR_ERRNO(); - *aLastModTimeOfLink = int64_t(sbuf.st_mtime) * int64_t(PR_MSEC_PER_SEC); + *aLastModTimeOfLink = PRTime(sbuf.st_mtime) * PR_MSEC_PER_SEC; return NS_OK; } @@ -1018,7 +1018,7 @@ nsLocalFile::GetLastModifiedTimeOfLink(int64_t *aLastModTimeOfLink) * utime(2) may or may not dereference symlinks, joy. */ NS_IMETHODIMP -nsLocalFile::SetLastModifiedTimeOfLink(int64_t aLastModTimeOfLink) +nsLocalFile::SetLastModifiedTimeOfLink(PRTime aLastModTimeOfLink) { return SetLastModifiedTime(aLastModTimeOfLink); } diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index d62d928c797..6a10056f5e8 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -2250,7 +2250,7 @@ nsLocalFile::Remove(bool recursive) } NS_IMETHODIMP -nsLocalFile::GetLastModifiedTime(int64_t *aLastModifiedTime) +nsLocalFile::GetLastModifiedTime(PRTime *aLastModifiedTime) { // Check we are correctly initialized. CHECK_mWorkingPath(); @@ -2275,7 +2275,7 @@ nsLocalFile::GetLastModifiedTime(int64_t *aLastModifiedTime) NS_IMETHODIMP -nsLocalFile::GetLastModifiedTimeOfLink(int64_t *aLastModifiedTime) +nsLocalFile::GetLastModifiedTimeOfLink(PRTime *aLastModifiedTime) { // Check we are correctly initialized. CHECK_mWorkingPath(); @@ -2299,7 +2299,7 @@ nsLocalFile::GetLastModifiedTimeOfLink(int64_t *aLastModifiedTime) NS_IMETHODIMP -nsLocalFile::SetLastModifiedTime(int64_t aLastModifiedTime) +nsLocalFile::SetLastModifiedTime(PRTime aLastModifiedTime) { // Check we are correctly initialized. CHECK_mWorkingPath(); @@ -2322,7 +2322,7 @@ nsLocalFile::SetLastModifiedTime(int64_t aLastModifiedTime) NS_IMETHODIMP -nsLocalFile::SetLastModifiedTimeOfLink(int64_t aLastModifiedTime) +nsLocalFile::SetLastModifiedTimeOfLink(PRTime aLastModifiedTime) { // The caller is assumed to have already called IsSymlink // and to have found that this file is a link. @@ -2335,7 +2335,7 @@ nsLocalFile::SetLastModifiedTimeOfLink(int64_t aLastModifiedTime) } nsresult -nsLocalFile::SetModDate(int64_t aLastModifiedTime, const PRUnichar *filePath) +nsLocalFile::SetModDate(PRTime aLastModifiedTime, const PRUnichar *filePath) { // The FILE_FLAG_BACKUP_SEMANTICS is required in order to change the // modification time for directories. diff --git a/xpcom/system/nsIXULRuntime.idl b/xpcom/system/nsIXULRuntime.idl index 4d512041dc3..07466fc070f 100644 --- a/xpcom/system/nsIXULRuntime.idl +++ b/xpcom/system/nsIXULRuntime.idl @@ -88,7 +88,7 @@ interface nsIXULRuntime : nsISupports * this startup. Used to know the last time the profile was used and not * closed cleanly. This is set to 0 if there was no existing profile lock. */ - readonly attribute int64_t replacedLockTime; + readonly attribute PRTime replacedLockTime; /** * Local ID of the minidump generated when the process crashed