Closed
Bug 786196
Opened 12 years ago
Closed 12 years ago
[OS.File] Implement flushing
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla18
People
(Reporter: Yoric, Assigned: Luqman)
References
Details
(Whiteboard: [mentor=Yoric][lang=js][lang=c])
Attachments
(1 file, 5 obsolete files)
5.08 KB,
patch
|
Details | Diff | Splinter Review |
We need an operation |OS.File.prototype.flush|. This operation should be implemented with: - |fsync| under Unix; - |FlushFileBuffers| under Windows. Getting in the code of OS.File might be tricky, but implementation should be easy, so marking this as a mentored bug.
Assignee | ||
Comment 1•12 years ago
|
||
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 656116 [details] [diff] [review] [OS.File] Implement flushing Review of attachment 656116 [details] [diff] [review]: ----------------------------------------------------------------- This looks good, thanks for the patch.
Attachment #656116 -
Flags: review+
Reporter | ||
Comment 3•12 years ago
|
||
It might be useful to add a trivial testsuite that ensures that |foo.flush()| does not cause an error, where |foo| is an open file.
Assignee | ||
Comment 4•12 years ago
|
||
Added simple testcase.
Attachment #656116 -
Attachment is obsolete: true
Reporter | ||
Comment 5•12 years ago
|
||
Comment on attachment 656166 [details] [diff] [review] [OS.File] Implement flushing Review of attachment 656166 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. However, I am not sure whether flushing works on files opened for reading. Just in case it doesn't, could you adapt the test suite to files opened for writing?
Attachment #656166 -
Flags: feedback+
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #656166 -
Attachment is obsolete: true
Reporter | ||
Comment 7•12 years ago
|
||
Comment on attachment 656171 [details] [diff] [review] [OS.File] Implement flushing Review of attachment 656171 [details] [diff] [review]: ----------------------------------------------------------------- Er... please don't overwrite important files during the test :)
Attachment #656171 -
Flags: feedback+
Assignee | ||
Comment 8•12 years ago
|
||
No more overwriting important files
Attachment #656171 -
Attachment is obsolete: true
Reporter | ||
Comment 9•12 years ago
|
||
Comment on attachment 656188 [details] [diff] [review] [OS.File] Implement flushing Review of attachment 656188 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Could you just call the file test_flush.tmp (no directory component) to match other files created by the test? No need to re-ask me for a review for this.
Attachment #656188 -
Flags: review+
Assignee | ||
Comment 10•12 years ago
|
||
Attachment #656188 -
Attachment is obsolete: true
Updated•12 years ago
|
Assignee: nobody → laden
Status: NEW → ASSIGNED
Assignee | ||
Comment 11•12 years ago
|
||
Attachment #656191 -
Attachment is obsolete: true
Assignee | ||
Comment 12•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=480840907ab5
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 13•12 years ago
|
||
(In reply to Luqman Aden from comment #12) > https://tbpl.mozilla.org/?tree=Try&rev=480840907ab5 Green on Try. https://hg.mozilla.org/integration/mozilla-inbound/rev/e53491a235ca
Flags: in-testsuite+
Keywords: checkin-needed
Comment 14•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e53491a235ca
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Updated•11 months ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•