Closed Bug 332045 Opened 19 years ago Closed 19 years ago

toolkit/components/gnome should use the glue

Categories

(Toolkit Graveyard :: Build Config, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

Attachments

(1 file)

toolkit/components/gnome should use the frozen string API and the glue
Attachment #216591 - Flags: first-review?(darin)
Comment on attachment 216591 [details] [diff] [review] Build components/gnome against the glue, rev. 1 >Index: toolkit/components/gnome/nsGConfService.cpp >+ nsCAutoString key(NS_LITERAL_CSTRING("/desktop/gnome/url-handlers/")); >+ key.Append(aScheme); >+ key.Append(NS_LITERAL_CSTRING("/command")); Personally, I'd just drop the NS_LITERAL_CSTRING calls here. The savings of not having to compute string lengths is probably not significant compared to the cost of initializing and finalizing nsCStringContainer objects. Same goes for elsewhere. >Index: toolkit/components/gnome/nsGnomeVFSService.cpp ... > NS_IMETHODIMP > nsGnomeVFSMimeApp::GetSupportedURISchemes(nsIUTF8StringEnumerator** aSchemes) > { > *aSchemes = nsnull; > >+ nsRefPtr<UTF8StringEnumerator> array = new UTF8StringEnumerator(); > NS_ENSURE_TRUE(array, NS_ERROR_OUT_OF_MEMORY); > > for (GList *list = mApp->supported_uri_schemes; list; list = list->next) { >+ if (!array->mStrings.AppendElement(nsDependentCString((char*) list->data))) { Did you try compiling this without the nsDependentCString(...) bit? I think it should work because nsCString has a constructor that takes a |const char *|. The nsDependentCString doesn't do anything to avoid a string copy. >+ nsCAutoString fileExtToUse(NS_LITERAL_CSTRING(".")); >+ fileExtToUse.Append(aExtension); Again, NS_LITERAL_CSTRING could be dropped here. r=darin
Attachment #216591 - Flags: first-review?(darin) → first-review+
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Wrong bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Really fixed on trunk.
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: