Closed Bug 1158437 Opened 10 years ago Closed 10 years ago

dom::File totally mishandles negative modification dates

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: bzbarsky, Assigned: baku)

References

Details

Attachments

(1 file)

This: (new File([], { lastModified: -1 })).lastModified returns 1429928122205. That's busted. So is the fact that (new File([], { lastModified: -1000 })).lastModified returns 1429928167714 (which is _bigger_ than the other value). Per spec, lastModified is signed, and negative values are perfectly OK. Why is our impl storing it unsigned?
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attached patch date.patchSplinter Review
Attachment #8597688 - Flags: review?(bugs)
Comment on attachment 8597688 [details] [diff] [review] date.patch Could you add some test that lastModifiedDate returns something sane. http://mxr.mozilla.org/mozilla-central/source/dom/webidl/File.webidl#45
Attachment #8597688 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: