summaryrefslogtreecommitdiff
path: root/Source/WebCore/fileapi/File.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/fileapi/File.cpp')
-rw-r--r--Source/WebCore/fileapi/File.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/WebCore/fileapi/File.cpp b/Source/WebCore/fileapi/File.cpp
index 098084807..86d59894f 100644
--- a/Source/WebCore/fileapi/File.cpp
+++ b/Source/WebCore/fileapi/File.cpp
@@ -130,7 +130,7 @@ File::File(const String& name, const FileMetadata& metadata)
double File::lastModifiedDate() const
{
#if ENABLE(FILE_SYSTEM)
- if (m_snapshotSize >= 0 && m_snapshotModificationTime)
+ if (hasValidSnapshotMetadata())
return m_snapshotModificationTime * 1000.0;
#endif
@@ -142,10 +142,16 @@ double File::lastModifiedDate() const
return modificationTime * 1000.0;
}
+double File::lastModifiedDateForBinding() const
+{
+ double value = lastModifiedDate();
+ return (!value) ? std::numeric_limits<double>::quiet_NaN() : value;
+}
+
unsigned long long File::size() const
{
#if ENABLE(FILE_SYSTEM)
- if (m_snapshotSize >= 0 && m_snapshotModificationTime)
+ if (hasValidSnapshotMetadata())
return m_snapshotSize;
#endif
@@ -160,7 +166,7 @@ unsigned long long File::size() const
void File::captureSnapshot(long long& snapshotSize, double& snapshotModificationTime) const
{
#if ENABLE(FILE_SYSTEM)
- if (m_snapshotSize >= 0 && m_snapshotModificationTime) {
+ if (hasValidSnapshotMetadata()) {
snapshotSize = m_snapshotSize;
snapshotModificationTime = m_snapshotModificationTime;
return;