Closed Bug 337731 Opened 20 years ago Closed 19 years ago

Make gnomefvs use frozen linkage

Categories

(Core :: Networking: File, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

Attachments

(2 files, 1 obsolete file)

Because it uses runtime resolution of the optional gnomevfs libraries, it cannot be part of libxul.
Attachment #222698 - Flags: review?(darin)
Comment on attachment 222698 [details] [diff] [review] Frozen linkage for gnomevfs, rev. 1 >Index: extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp >+ nsAutoString dispHost = NS_ConvertUTF8toUTF16(scheme); NS_ConvertUTF8toUTF16 dispHost(scheme); >+ mDirBuf.Append(NS_LITERAL_CSTRING("300: ")); Avoid calling NS_LITERAL_CSTRING since it just adds code bloat. What we really need is AppendLiteral, but in place of that I'd just call Append("300: ") since that is going to be less code and plenty efficient. >+ if (mSpec.get()[mSpec.Length() - 1] != '/') Hmm... we should define CharAt or maybe even operator[] :-) >+static void >+StripWhitespace(nsCString& aString) >+{ This should be moved into nsStringAPI, no? At least it should make use of the APIs you added there. Perhaps nsStringAPI.h should have a .Strip method? >- PRInt32 colon = spec.FindChar(':'); >- if (colon == kNotFound) >+ const char *specstring = aSpec.get(); nit: specString or specStr r=darin
Attachment #222698 - Flags: review?(darin) → review+
Attached patch astring.StripChars(), rev. 1 (obsolete) — Splinter Review
Ok, this implements the StripChars and StripWhitespace signatures on the external nsAString/nsACString, and unit-tests them.
Comment on attachment 222797 [details] [diff] [review] astring.StripChars(), rev. 1 What if BeginWriting fails on |this|?
BeginWriting can fail? Ugh
Attachment #222797 - Attachment is obsolete: true
Attachment #222854 - Flags: review?(darin)
Attachment #222854 - Flags: review?(darin) → review+
I landed this on trunk on 2006-05-23
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: