Closed Bug 261593 Opened 20 years ago Closed 20 years ago

get rid of AssignWithConversion in filesystemdatasource

Categories

(Core Graveyard :: RDF, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha5

People

(Reporter: Biesinger, Assigned: Biesinger)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
Comment on attachment 160092 [details] [diff] [review]
patch

- most of the patch is correct because GetValueConst returns UTF-8, as
described in nsIRDFResource.idl

- the beos part is correct because UTF-8 is beos's native encoding
Attachment #160092 - Flags: review?(bsmedberg)
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
I'd rather see us fixing the string usage here right, this is just wallpapering
over one issue.
Why not use 
nsCString uri;
rv = source->GetValueUTF8(uri); // this just refcounts the buffer
if (NS_FAILED(rv)) return(rv);

NS_ConvertUTF8toUTF16 theURI(uri);

This seems to do, up to not doing an additional string length check, the exact
same thing.
Attachment #160092 - Attachment is obsolete: true
Attachment #160092 - Flags: review?(bsmedberg)
Target Milestone: mozilla1.8beta → mozilla1.8alpha5
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #160638 - Attachment is obsolete: true
Attachment #160638 - Flags: review?(axel)
Attached patch patch v3Splinter Review
fully addresses review comment
Comment on attachment 160647 [details] [diff] [review]
patch  v3

r=axel@pike.org
Attachment #160647 - Flags: review?(axel) → review+
Attachment #160647 - Flags: superreview?(darin)
Attachment #160647 - Flags: superreview?(darin) → superreview+
Checking in rdf/datasource/src/nsFileSystemDataSource.cpp;
/cvsroot/mozilla/rdf/datasource/src/nsFileSystemDataSource.cpp,v  <-- 
nsFileSystemDataSource.cpp
new revision: 1.137; previous revision: 1.136
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: