Rename {winLastCreation, winLastWrite, winLastAccess}Time -> Date

RESOLVED FIXED in mozilla17

Status

()

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Yoric, Assigned: Yoric)

Tracking

unspecified
mozilla17
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

For uniformity, we should rename winLastCreationTime et al to winLastCreationDate.
Created attachment 652458 [details] [diff] [review]
Renaming *Time to *Date
Assignee: nobody → dteller
Attachment #652458 - Flags: review?(nfroyd)
Comment on attachment 652458 [details] [diff] [review]
Renaming *Time to *Date

Review of attachment 652458 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/osfile/osfile_win_front.jsm
@@ +611,3 @@
>           let date = FILETIME_to_Date(this._ftCreationTime);
> +         delete this.winCreationDate;
> +         Object.defineProperty(this, "winCreationDate", {value: date});

For my own edification, why are we doing this delete/defineProperty dance?  This doesn't appear to buy anything save garbage generation, and some quick Googling doesn't turn up this pattern.  I thought the whole point of getters was that you could compute things dynamically.
Attachment #652458 - Flags: review?(nfroyd) → review+
(In reply to David Rajchenbach Teller [:Yoric] from comment #3)
> Does the following reply to your question?
> https://bug766194.bugzilla.mozilla.org/attachment.cgi?id=641495

Oh my.  That's...awful.  I see the idiom now, but...*whistles*.
In js-ctypes based stuff, I have started using this idiom everywhere, because calling a C function from JS is expensive, non-JIT-able, and also requires some gc-ing.
Created attachment 652775 [details] [diff] [review]
Renaming *Time to *Date
Attachment #652458 - Attachment is obsolete: true
Attachment #652775 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/15cdfa85ed10
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.