Replace some char* allocs with nsCString in nsImapBodyShell
Categories
(MailNews Core :: General, task)
Tracking
(Not tracked)
People
(Reporter: benc, Assigned: benc)
References
Details
(Keywords: leave-open)
Attachments
(2 files)
There's a bit of char* usage in nsImapBodyShell that'd benefit from using ns[A]CString instead.
Assignee | ||
Comment 1•4 years ago
|
||
Depends on D123580
Assignee | ||
Comment 2•4 years ago
|
||
Setting leave-open. It looks like the char* replacement could continue upward a layer or two up the callstack, so there'll probably be another patch or two to come.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/bb0d25b8f6d7
Use nsCString to store nsImapBodyShell folder name instead of allocating char buffer. r=mkmelin
Comment 4•4 years ago
|
||
https://hg.mozilla.org/comm-central/rev/bb0d25b8f6d7979fff31adea983b6b75a7091be8#l3.14
Why not use nsDependentCString()?
Assignee | ||
Comment 5•4 years ago
|
||
(In reply to José M. Muñoz from comment #4)
Why not use nsDependentCString()?
Good point - thanks! Patch incoming.
Assignee | ||
Comment 6•4 years ago
|
||
Comment 7•4 years ago
|
||
That still doesn't follow the usual path that is taken when converting raw string to smart string, example here:
https://hg.mozilla.org/comm-central/rev/88afdfc38ae6#l2.49
You don't need the variables.
Assignee | ||
Comment 8•4 years ago
|
||
(In reply to José M. Muñoz from comment #7)
You don't need the variables.
Patch revised (Small enough change that I kept the existing r+) - thanks!
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/312205101b78
Some minor nsDependentCString fixups in nsImapHostSessionList. r=mkmelin
Assignee | ||
Comment 10•3 years ago
|
||
The partNum handling is a bit infuriating - it takes a little unpicking to figure out the ownership of the raw char*. So the next step here would be to use string objects instead. Changes would spread across nsImapBodyShell and nsImapUrl.
Description
•