Closed
Bug 359472
Opened 18 years ago
Closed 18 years ago
RDF should use nsISafeOutputStream
Categories
(Core Graveyard :: RDF, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 375102
People
(Reporter: ian, Unassigned)
Details
Attachments
(1 file)
(deleted),
patch
|
axel
:
review-
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 Flock/0.7.4.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 Flock/0.7.4.1
Right now the nsRDFXMLDataSource will leave its RDF/XML file in a bad state if writes fail or the application terminates during serialization. The good news is that the platform supports nsSafeFileOutputStream which is used in a bunch of places, including bookmarks to provide this behaviour in a cross-platform way.
I made this change in Flock since we currently use RDF/XML files fairly heavilly, it seems to work well. I'll attach my patch.
Reproducible: Always
Updated•18 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 1•18 years ago
|
||
And there's a typo fix in there too.
Attachment #244645 -
Flags: review?
Reporter | ||
Updated•18 years ago
|
Attachment #244645 -
Flags: review? → review?(axel)
Comment 2•18 years ago
|
||
Comment on attachment 244645 [details] [diff] [review]
This patch uses the same technique as the bookmarks service
Sorry for the lag. r- on this one, we shouldn't carry the logic bugs through.
Could you add an early return for the failures? This code looks weird, checking for stuff that failed ages ago, but differently than before. Like, one part checks if (out), and in the end, you check NS_SUCCEEDED(rv).
And I'd like to have {}, even for single line ifs, and no indention whitespace on empty lines.
I'll try to not let another patch lag this bad.
Attachment #244645 -
Flags: review?(axel) → review-
Comment 3•18 years ago
|
||
This is a duplicate of bug #375102.
Comment 4•18 years ago
|
||
Well, not a duplicate in the strict sense, but the other bug has a landed patch, so yes, closing DUPE.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•